Skip to content

momamansour/API-TVshows

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

API-TVshows

This is a Flask-Restx data service that allows a client to read and store some TV Shows, and allow the consumers to access the data through a REST API.

It uses available data on The TV Maze API, which provides a detailed list of TV shows. You can explore the TVmaze API using the following links:

Import a TV Show

This operation can be considered as an on-demand 'import' operation to get the details of a TV show and store it in your application. The service will download the JSON data for the given TV show (by its name). It uses sqlite for storing the data.

To import a tv show, the API accepts a query parameter called "name".:

  • name : title for the tv show

After importing the collection, the service should return a response containing at least the following information:

  • id : a unique integer identifier automatically generated (this might be different than tvmase_id) tvmaze-id : the id of the tv show in tvmaze API
  • last-update : the time the collection stored in the database
  • _links : the URL with which the imported collection can be retrieved (as shown in below example)

Retrieve a TV Show

This operation retrieves a collection by its ID (the ID that is generated by the application) . The response of this operation will show the details of TV show.

Deleting a TV show

This operation deletes an existing TV show from the database.

Update a TV Show

This operation partially updates the details of a given TV Show.

Retrieve the list of available TV Shows

This operation retrieves all available TV shows. The interface should look like the below:

GET /tv-shows?order_by= & page=1 & page_size=100 & filter=

All four parameters are optional with default values being "order_by=+id", "page=1", and "page_size =100", filter="id,name". "page" and "page_size" are used for pagination; "page_size" shows the number of TV shows per page. "order_by" is a comma separated string value to sort the list based on the given criteria. The string consists of two parts: the first part is a special character '+' or '-' where '+' indicates ordering ascendingly, and '-' indicates ordering descendingly .

Get the statistics of the existing TV Shows

This operations accepts a parameter called "format" which can be either "json" or "image". Depending on the format your operation should provide the following information: In case when the the format is image, your operation should return an image (can be in any image format) and the image illustrates the requested information in a visualization (apply all your knowledge when creating the visualization such as choosing appropriate visualization type and making sure that it is human readable, clear, and informative).

  • TV shows break down by an attribute determined by the "by" parameter; this parameter can be any of the following TV show attributes: "language" (showing the percentage of TV shows per Language), "genres", "status", and "type". In case of "genres", a TV show can have multiple values; you should come up with a solution to visualise it. For instance you can think of h ow to visualise what percentage of movies belong to both "Comedy" and "Crime" genres, etc.
  • Total Number of TV shows
  • Total Number of TV shows updated in the last 24 hours

About

RESTful-API for data storage and visualisation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages