-
Notifications
You must be signed in to change notification settings - Fork 0
Individual Contribution Report 2(Erkam Kavak)
- #152 Learning Flask API and Git
- #160 Researching and implementing Steam API
- #169 Dockerizing and publishing to AWS EC2
- #179 Change database structure
- #197 Adding tests for get game information API
I used the Steam API for getting information about games which are available at Steam. I thought it will be useful for the next semester since we may have Game pages for each game and we can show informations about them in their page. It provides short and detailed description about the game. Also it provides screenshots about the game and the categories of the game. Since there is no URL for getting information of a game from its name, I used two different URL's from Steam API. One of them is for pulling list of games from Steam API (https://api.steampowered.com/ISteamApps/GetAppList/v2/) and the other one is pulling information about the game from its id(https://store.steampowered.com/api/appdetails?appids={game_id}). I used the first URL for pulling game id of the game from its name and the second one for pulling game information of the game from its id.
I have created three different functions. These three different function includes 1 GET and 3 POST request. These functions are as follows:
-
get_game_information
-GET: Returns the initial page of the API. It returns an HTML page which contains searchbar for searching games. -
get_game_information
-POST: Returns the information about the game which is given as of its name in the request. Game name should be given as 'game_name'. It will pull the information about the game using Steam API and it will return an HTML page containing the game informations. If there occurs any problem such as 'Game is not found' or 'Game name is not entered', it returns the initial page with the error. -
add_to_favorites
-POST: Adds the game to the favorites of the user and returns the log of the operation. Name and id of the game should be given in the request as 'game_name' and 'game_id'. This is a login_required function which requires the user to be logged in the website before. It uses the id of the user to save the game as favorite for that user on the database. If returns log of "Game already added to favorites for this user!" if the game was previously added for that user. -
show_all_favorites
-POST: Pulls all the favorite games for the current user. Since it pulls the information from the user's id, it requires no information in the request. It filters the games from the database with user's id and returns all the filtered games in an html page. The page lists filtered game's names.
These functions allow for seeing information about the games, adding new games to favorites and looking at the favorites games later.
I created 8 different tests. 3 for signing and logging on the website, 2 for getting game information and 2 for adding and pulling favorite games.
-
Signup, login and invalid login tests:
-
Logout test:
-
Getting game information and posting(searching) game information tests:
-
Adding game to favorites and showing added favorite games tests:
You can test these unittest by cloning our repository and running pytest
command in the tests
folder.
I created the docker and docker-compose files for dockerization. I published the docker container on an AWS free tier Ec2 instance. I reviewed lots of PRs with detailed inspections.
Sending ajax request from html and returning to the same page using Javascript was hard for me since I don't have much experience with javascript. Creating unit tests for sign-up and login on flask was another hard thing for me to do because there were not much resources about it. Lastly the hardest one was creating a docker-compose file for running both postgres and our web-app on the docker container. It was hard because it was about postgres and docker 😄
- Ahmet Kudu
- Beyzanur Bektan
- Emre Sin
- Emre Türker
- Erkam Kavak
- Halis Ayberk Erdem
- Hüseyin Çivi
- Ömer Bahadıroğlu
- Ömer Talip Akalın
- Sena Özpınar
- Süleyman Melih Portakal
- Umut Demir
- Muhammet Mustafa Küçük
- Scenarios
- Mockups
- Meeting #1 - 03.03.2023
- Meeting #2 - 10.03.2023
- Meeting #3 - 12.03.2023
- Meeting #4 - 13.03.2023
- Meeting #5 - 19.03.2023
- Meeting #6 - 24.03.2023
- Meeting #7 - 26.03.2023
- Meeting #8 - 30.03.2023
- Meeting #9 - 02.04.2023
- Meeting #10 - 04.04.2023
- Meeting #11 - 05.04.2023
- Meeting #12 - 06.04.2023
- Meeting #13 - 07.04.2023
- Meeting #14 - 08.04.2023
- Meeting #15 - 09.04.2023
- Meeting #16 - 27.04.2023
- Meeting #17 - 30.04.2023
- Meeting #18 - 04.05.2023
- Meeting #19 - 07.05.2023
- Meeting #20 - 11.05.2023
- Meeting #21 - 05.10.2023
- Meeting #22 - 11.10.2023
- Meeting #23 - 16.10.2023
- Meeting #1 - 21.10.2023 (Backend)
- Meeting #1 - 22.10.2023 (Frontend)