Skip to content

A Rest API made with ASP.NET Core + SQL Server to the My Games List app.

Notifications You must be signed in to change notification settings

SamuelIGT/MyGamesList-API

Repository files navigation

My Games List API

Overview

A Rest API made with ASP.NET Core + SQL Server to the My Games List app.

Version information

Version : v1

Contact information

Contact : Samuel Alves

Database

ER Diagram

ER Diagram

Available Endpoints

Creates a new Game.

POST /api/Game

Description

Request example:

POST /game
{
    "steamAppid": 1102,
    "title": "Half-Life",
    "shortDescription": "The best game ever.",
    "detailedDescription": "Half-life is the best game ever...",
    "headerImage": "https://steamcdn-a.akamaihd.net/steam/apps/1102/header.jpg",
    "price": 25.90
}

Parameters

Type Name Schema
Body game
optional
Game

Responses

HTTP Code Description Schema
201 Returns the Game created Game
400 The Game passed is null No Content

Consumes

  • application/json-patch+json
  • application/json
  • text/json
  • application/*+json

Produces

  • application/json

Tags

  • Game

List all Games.

GET /api/Game

Responses

HTTP Code Description Schema
200 Success < Game > array

Produces

  • application/json

Tags

  • Game

Lists the Game with corresponding id.

GET /api/Game/{id}

Parameters

Type Name Schema
Path id
required
integer (int64)

Responses

HTTP Code Description Schema
200 Returns the expected Game Game
404 If no Game with the same id was found No Content

Produces

  • application/json

Tags

  • Game

Updates a Game.

PUT /api/Game/{id}

Parameters

Type Name Schema
Path id
required
integer (int64)
Body game
optional
Game

Responses

HTTP Code Description Schema
204 Updated with success No Content
400 If the Game passed is null or its id is different from the one passed on the url. No Content
404 If no Game with the same id was found No Content

Consumes

  • application/json-patch+json
  • application/json
  • text/json
  • application/*+json

Tags

  • Game

Deletes a Game.

DELETE /api/Game/{id}

Parameters

Type Name Schema
Path id
required
integer (int64)

Responses

HTTP Code Description Schema
204 If no Game item with the same id was found No Content
400 Deleted with success No Content

Tags

  • Game

Creates a new OwnedGame.

POST /api/OwnedGame

Parameters

Type Name Schema
Body game
optional
OwnedGame

Responses

HTTP Code Description Schema
201 Returns the OwnedGame created OwnedGame
400 If the OwnedGame is null No Content

Consumes

  • application/json-patch+json
  • application/json
  • text/json
  • application/*+json

Produces

  • application/json

Tags

  • OwnedGame

Lists all OwnedGames

GET /api/OwnedGame

Responses

HTTP Code Description Schema
200 Success < OwnedGame > array

Produces

  • application/json

Tags

  • OwnedGame

Lists the OwnedGame with corresponding id.

GET /api/OwnedGame/{id}

Parameters

Type Name Schema
Path id
required
integer (int64)

Responses

HTTP Code Description Schema
200 Returns the expected OwnedGame OwnedGame
404 If no OwnedGame with the same id was found No Content

Produces

  • application/json

Tags

  • OwnedGame

Updates the OwnedGame.

PUT /api/OwnedGame/{id}

Parameters

Type Name Schema
Path id
required
integer (int64)
Body game
optional
OwnedGame

Responses

HTTP Code Description Schema
204 Updated with success No Content
400 If the OwnedGame passed is null or its id is different from the one passed on the url. No Content
404 If no OwnedGame with the same id was found No Content

Consumes

  • application/json-patch+json
  • application/json
  • text/json
  • application/*+json

Tags

  • OwnedGame

Deletes the OwnedGame.

DELETE /api/OwnedGame/{id}

Parameters

Type Name Schema
Path id
required
integer (int64)

Responses

HTTP Code Description Schema
204 Deleted with success No Content
404 If no OwnedGame with the same id was found No Content

Tags

  • OwnedGame

Creates a new User.

POST /api/User

Parameters

Type Name Schema
Body user
optional
User

Responses

HTTP Code Description Schema
201 Returns the User created User
400 If the User is null No Content

Consumes

  • application/json-patch+json
  • application/json
  • text/json
  • application/*+json

Produces

  • application/json

Tags

  • User

List all Users.

GET /api/User

Responses

HTTP Code Description Schema
200 Success < User > array

Produces

  • application/json

Tags

  • User

Lists the User with corresponding id.

GET /api/User/{id}

Parameters

Type Name Schema
Path id
required
integer (int64)

Responses

HTTP Code Description Schema
200 Returns the expected User User
404 If no User with the same id was found No Content

Produces

  • application/json

Tags

  • User

Updates a User

PUT /api/User/{id}

Parameters

Type Name Schema
Path id
required
integer (int64)
Body user
optional
User

Responses

HTTP Code Description Schema
204 Updated with success No Content
400 If the User passed is null or its id is different from the one passed on the url. No Content
404 If no User with the same id was found No Content

Consumes

  • application/json-patch+json
  • application/json
  • text/json
  • application/*+json

Tags

  • User

Deletes a User

DELETE /api/User/{id}

Parameters

Type Name Schema
Path id
required
integer (int64)

Responses

HTTP Code Description Schema
204 Deleted with success No Content
404 If no User with the same id was found No Content

Tags

  • User

Creates a new WishlistItem.

POST /api/WishlistItem

Parameters

Type Name Schema
Body item
optional
WishlistItem

Responses

HTTP Code Description Schema
201 Returns the WishlistItem created WishlistItem
400 If the WishlistItem is null No Content

Consumes

  • application/json-patch+json
  • application/json
  • text/json
  • application/*+json

Produces

  • application/json

Tags

  • WishlistItem

Lists all WishlistItems.

GET /api/WishlistItem

Responses

HTTP Code Description Schema
200 Success < WishlistItem > array

Produces

  • application/json

Tags

  • WishlistItem

Lists the WishlistItem with the corresponding id.

GET /api/WishlistItem/{id}

Parameters

Type Name Schema
Path id
required
integer (int64)

Responses

HTTP Code Description Schema
200 Returns the expected WishlistItem WishlistItem
404 If no WishlistItem with the same id was found No Content

Produces

  • application/json

Tags

  • WishlistItem

Updates the WishlistItem.

PUT /api/WishlistItem/{id}

Parameters

Type Name Schema
Path id
required
integer (int64)
Body item
optional
WishlistItem

Responses

HTTP Code Description Schema
204 Updated with success No Content
400 If the WishlistItem passed is null or its id is different from the one passed on the url. No Content
404 If no WishlistItem with the same id was found No Content

Consumes

  • application/json-patch+json
  • application/json
  • text/json
  • application/*+json

Tags

  • WishlistItem

Deletes the WishlistItem.

DELETE /api/WishlistItem/{id}

Parameters

Type Name Schema
Path id
required
integer (int64)

Responses

HTTP Code Description Schema
204 Deleted with success No Content
404 If no WishlistItem with the same id was found No Content

Tags

  • WishlistItem

Models

Game

Name Description Schema
detailedDescription
optional
Length : 0 - 3000 string
headerImage
optional
Length : 0 - 300 string
id
optional
integer (int64)
price
optional
number (double)
shortDescription
optional
Length : 0 - 500 string
steamAppid
optional
integer (int64)
title
required
Length : 0 - 300 string

OwnedGame

Name Schema
game
required
Game
id
optional
integer (int64)
playtimeForever
optional
integer (int64)
playtimeTwoWeeks
optional
integer (int64)

User

Name Description Schema
email
required
Length : 0 - 250 string
id
optional
integer (int64)
name
required
Length : 0 - 250 string
ownedGames
optional
< OwnedGame > array
wishlist
optional
< WishlistItem > array

WishlistItem

Name Schema
game
required
Game
id
optional
integer (int64)
rankPosition
optional
integer (int32)

About

A Rest API made with ASP.NET Core + SQL Server to the My Games List app.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages