Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Random Game API #212

Closed
6 of 7 tasks
mtkamiloglu opened this issue May 12, 2023 · 1 comment
Closed
6 of 7 tasks

Random Game API #212

mtkamiloglu opened this issue May 12, 2023 · 1 comment
Assignees
Labels
effort : high This issue can take a significant amount of time priority : high Job needs to be completed at most two days status : completed Issue is completed type : development Updates and enhancements on the application

Comments

@mtkamiloglu
Copy link
Contributor

mtkamiloglu commented May 12, 2023

Issue Description

Task

I will use Steam API to fetch random game from its library. I thought it will be nice to have function to suggest a random game. I am inspired by XBOX Game Pass suggestion feature. My API will send request to the public API (https://api.steampowered.com/ISteamApps/GetAppList/v2/). It will send a JSON object and my API will choose a random game from this object. And another function will add this game to the database. My functionalities are:

  • Returning a random game to the user and adding this game to the user's history.
  • Returning the random game history of the user from database.

Views

Endpoints

I will utilize the following endpoints

  • /random-game is a POST method that returns a random game from Steam library and adds it to the database.
  • /random-game/history is a GET method that returns random game history of the user.

Model

To store the random games, I will create a randomGame schema following the corresponding columns:

  • appId is the id of the game on Steam
  • name is the name of the random game
  • shortDescription is a string short description of the game.
  • headerImage is the link to the image of the game.
  • price is the price of the game. It is stored as a string
  • email is the email of the user.

Tests

I will test get and post method.

Swagger Documentation

I will provide swagger documentation for the routes.

Tasks

Parts of the task:

  • Create a new branch for the task
  • Create methods for /random-game endpoint.
  • Create methods for /random-game/history endpoint.
  • Testing the API function with Postman
  • Adding swagger documentations
  • Creating unit test unit test for the api functions
  • Pushing the api functions to the branch and create a new pull request.

Extra Comments

No response

Final Step

After finishing the task, I will create a pull request.

Deadline of the Issue

12.05.2023 - 12:00

Reviewer

Deadline for the Review

12.05.2023 - 20:00

@mtkamiloglu mtkamiloglu added type : development Updates and enhancements on the application priority : high Job needs to be completed at most two days status : new New issue in initial state effort : high This issue can take a significant amount of time labels May 12, 2023
@mtkamiloglu mtkamiloglu self-assigned this May 12, 2023
@mtkamiloglu mtkamiloglu changed the title Radnom Game API Random Game API May 12, 2023
@mtkamiloglu
Copy link
Contributor Author

I created the public API and it's deployed to AWS server. It works correctly. I am closing the issue.

@mtkamiloglu mtkamiloglu added status : in_progress Issue is currently in progress status : completed Issue is completed and removed status : new New issue in initial state status : in_progress Issue is currently in progress labels May 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort : high This issue can take a significant amount of time priority : high Job needs to be completed at most two days status : completed Issue is completed type : development Updates and enhancements on the application
Projects
None yet
Development

No branches or pull requests

1 participant