Skip to content

A simple REST Api used to manage Pokemon and its Owners, Countries, Categories, and Reviews.

Notifications You must be signed in to change notification settings

JosueJovel/dotnet-rest-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pokemon Management API

This Pokemon Management API is a REST API for managing Pokemon, Owners, and their Reviews. Pokemon have several components such as their Category/Type, a relationship to Owners, and Reviews of them. Owners own pokemon and are also linked to a specific Country. Reviewers can conduct reviews on pokemon.

Dotnet core and other important dependencies like Entity Framework were used to construct this API. SQLServer is used for the database, managed with the help of Sql Server Management Studio (SSMS).


Backend Documentation - API Endpoints

GET /api/Category

Retrieves a list of all categories present in the database.

Response

['CategoryDto']

GET /api/Category/{categoryId}

Retrieves a specific category based on Id. Responds with Bad Request if no id is found.

Response

'CategoryDto'

GET /api/Category/pokemon/{categoryId}

Retrieves all pokemon linked to a specific category. Responds with Bad Request if no id is found.

Response

'[PokemonDto]'

POST api/Category

Adds a new category to the database.

Request

'CategoryDto'

PUT /api/Category/{categoryId}

Updates a specific category based on Id. Responds with Bad Request if no id is found.

Request

'CategoryDto'

DELETE /api/Category/{categoryId}

Deletes a specific category based on Id. Responds with Bad Request if no id is found.

Request

'categoryId'

GET /api/Country

Retrieves a list of all countries present in the database.

Response

['CountryDto']

GET /api/Country/{countryId}

Retrieves a specific country based on Id. Responds with Bad Request if no id is found.

Response

'CountryDto'

GET /api/Country/owners/{ownerId}

Retrieves the country of a specified owner. Responds with Bad Request if no id is found.

Response

'CountryDto'

POST api/Country

Adds a new country to the database.

Request

'CountryDto'

PUT /api/Country/{countryId}

Updates a specific country based on Id. Responds with Bad Request if no id is found.

Request

'CountryDto'

DELETE /api/Country/{countryId}

Deletes a specific country based on Id. Responds with Bad Request if no id is found.

Request

'countryId'

GET /api/Owner

Retrieves a list of all owners present in the database.

Response

['OwnerDto']

GET /api/Owner/{ownerId}

Retrieves a specific owner based on Id. Responds with Bad Request if no id is found.

Response

'OwnerDto'

GET /api/Owner/{ownerId}/pokemon

Retrieves all pokemon owned by a specific owner. Responds with Bad Request if no id is found.

Response

'[PokemonDto]'

POST api/Owner

Adds a new owner to the database.

Request

'OwnerDto'

PUT /api/Owner/{ownerId}

Updates a specific owner based on Id. Responds with Bad Request if no id is found.

Request

'OwnerDto'

DELETE /api/Owner/{ownerId}

Deletes a specific owner based on Id. Responds with Bad Request if no id is found.

Request

'ownerId'

GET /api/Pokemon

Retrieves a list of all pokemon present in the database.

Response

['PokemonDto']

GET /api/Pokemon/{pokeId}

Retrieves a specific pokemon based on Id. Responds with Bad Request if no id is found.

Response

'PokemonDto'

GET /api/Pokemon/{pokeId}/rating

Retrieves the average rating of a pokemon based on all of its reviews. Responds with Bad Request if no id is found.

Response

'rating (1-5)'

POST api/Pokemon

Adds a new Pokemon to the database.

Request

'PokemonDto'

PUT /api/Pokemon/{pokeId}

Updates a specific pokemon based on Id. Responds with Bad Request if no id is found.

Request

'PokemonDto'

DELETE /api/Pokemon/{pokemonId}

Deletes a specific pokemon based on Id. Responds with Bad Request if no id is found.

Request

'pokemonId'

GET /api/Review

Retrieves a list of all reviews present in the database.

Response

['ReviewDto']

GET /api/Review/{reviewId}

Retrieves a specific review based on Id. Responds with Bad Request if no id is found.

Response

'ReviewDto'

GET /api/Review/pokemon/{pokeId}

Retrieves all reviews of a specific pokemon. Responds with Bad Request if no id is found.

Response

'[ReviewDto]'

POST api/Review

Adds a new review to the database.

Request

'ReviewDto'

PUT /api/Review/{reviewId}

Updates a specific review based on Id. Responds with Bad Request if no id is found.

Request

'OwnerDto'

DELETE /api/Review/{reviewId}

Deletes a specific review based on Id. Responds with Bad Request if no id is found.

Request

'reviewId'

GET /api/Reviewer

Retrieves a list of all reviewers present in the database.

Response

['ReviewerDto']

GET /api/Reviewer/{reviewerId}

Retrieves a specific reviewer based on Id. Responds with Bad Request if no id is found.

Response

'ReviewerDto'

GET /api/Review/{reviewerId}/reviews

Retrieves all reviews made by a specific reviewer. Responds with Bad Request if no id is found.

Response

'[ReviewDto]'

POST api/Reviewer

Adds a new reviewer to the database.

Request

'ReviewerDto'

PUT /api/Reviewer/{reviewerId}

Updates a specific reviewer based on Id. Responds with Bad Request if no id is found.

Request

'OwnerDto'

DELETE /api/Reviewer/{reviewerId}

Deletes a specific reviewer based on Id. Responds with Bad Request if no id is found.

Request

'reviewerId'

About

A simple REST Api used to manage Pokemon and its Owners, Countries, Categories, and Reviews.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages