UNPKG

openapi-directory

Version:

Building & bundling https://github.com/APIs-guru/openapi-directory for easy use from JS

1 lines 15.1 kB
{"openapi":"3.0.0","info":{"contact":{"url":"http://www.tvmaze.com"},"description":"Access to the user API is only possible for users with a [premium](http://www.tvmaze.com/premium) account. A user can only access their own user data.\n\nAuthentication uses HTTP Basic. Use the TVmaze username as authentication username, and the TVmaze API key as authentication password. Your API key can be found on your [dashboard](http://www.tvmaze.com/dashboard). To try out these API calls from this page, click the \"Authorize\" button on top and input your credentials.\n","title":"TVmaze user","version":"1.0","x-apisguru-categories":["media"],"x-logo":{"backgroundColor":"#FFFFFF","url":"https://twitter.com/tvmaze/profile_image?size=original"},"x-origin":[{"format":"swagger","url":"http://static.tvmaze.com/apidoc/v1.yaml","version":"2.0"}],"x-providerName":"tvmaze.com"},"security":[{"usertoken":[]}],"paths":{"/user/episodes":{"get":{"parameters":[{"description":"Only return episodes from this specific show","in":"query","name":"show_id","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"description":"An array of marked episodes","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/MarkedEpisode"},"type":"array"}}}}},"summary":"List the marked episodes","tags":["marked episodes"]}},"/user/episodes/{episode_id}":{"delete":{"responses":{"200":{"description":"the episode is now unmarked"},"404":{"description":"this episode was not marked"}},"summary":"Unmark an episode","tags":["marked episodes"]},"get":{"responses":{"200":{"description":"The marked episode","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarkedEpisode"}}}},"404":{"description":"This episode is not marked"}},"summary":"Check if an episode is marked","tags":["marked episodes"]},"parameters":[{"in":"path","name":"episode_id","required":true,"schema":{"type":"integer"}}],"put":{"description":"Set `marked_at` to `NULL` or leave it out to use the current time.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarkedEpisode"}}}},"responses":{"200":{"description":"this episode is now marked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarkedEpisode"}}}},"404":{"description":"this episode does not exist"},"422":{"description":"invalid input data"}},"summary":"Mark an episode","tags":["marked episodes"]}},"/user/follows/networks":{"get":{"parameters":[{"description":"Embed full network info","in":"query","name":"embed","required":false,"schema":{"type":"string","enum":["network"]}}],"responses":{"200":{"description":"An array of followed networks","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/NetworkFollow"},"type":"array"}}}}},"summary":"List the followed networks","tags":["followed networks"]}},"/user/follows/networks/{network_id}":{"delete":{"responses":{"200":{"description":"the network is now unfollowed"},"404":{"description":"this network was not followed"}},"summary":"Unfollow a network","tags":["followed networks"]},"get":{"responses":{"200":{"description":"The followed network","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NetworkFollow"}}}},"404":{"description":"this network is not followed"}},"summary":"Check if a network is followed","tags":["followed networks"]},"parameters":[{"in":"path","name":"network_id","required":true,"schema":{"type":"integer"}}],"put":{"responses":{"200":{"description":"this network is now followed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NetworkFollow"}}}},"404":{"description":"this network does not exist"}},"summary":"Follow a network","tags":["followed networks"]}},"/user/follows/people":{"get":{"parameters":[{"description":"Embed full person info","in":"query","name":"embed","required":false,"schema":{"type":"string","enum":["person"]}}],"responses":{"200":{"description":"An array of followed people","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PersonFollow"},"type":"array"}}}}},"summary":"List the followed people","tags":["followed people"]}},"/user/follows/people/{person_id}":{"delete":{"responses":{"200":{"description":"the person is now unfollowed"},"404":{"description":"this person was not followed"}},"summary":"Unfollow a person","tags":["followed people"]},"get":{"responses":{"200":{"description":"The followed person","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonFollow"}}}},"404":{"description":"this person is not followed"}},"summary":"Check if a person is followed","tags":["followed people"]},"parameters":[{"in":"path","name":"person_id","required":true,"schema":{"type":"integer"}}],"put":{"responses":{"200":{"description":"this person is now followed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonFollow"}}}},"404":{"description":"this person does not exist"}},"summary":"Follow a person","tags":["followed people"]}},"/user/follows/shows":{"get":{"parameters":[{"description":"Embed full show info","in":"query","name":"embed","required":false,"schema":{"type":"string","enum":["show"]}}],"responses":{"200":{"description":"An array of followed shows","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ShowFollow"},"type":"array"}}}}},"summary":"List the followed shows","tags":["followed shows"]}},"/user/follows/shows/{show_id}":{"delete":{"responses":{"200":{"description":"The show is now unfollowed"},"404":{"description":"This show was not followed"}},"summary":"Unfollow a show","tags":["followed shows"]},"get":{"responses":{"200":{"description":"The followed show","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShowFollow"}}}},"404":{"description":"This show is not followed"}},"summary":"Check if a show is followed","tags":["followed shows"]},"parameters":[{"in":"path","name":"show_id","required":true,"schema":{"type":"integer"}}],"put":{"responses":{"200":{"description":"This show is now followed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShowFollow"}}}},"404":{"description":"This show does not exist"}},"summary":"Follow a show","tags":["followed shows"]}},"/user/follows/webchannels":{"get":{"parameters":[{"description":"Embed full webchannel info","in":"query","name":"embed","required":false,"schema":{"type":"string","enum":["webchannel"]}}],"responses":{"200":{"description":"An array of followed webchannels","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/WebchannelFollow"},"type":"array"}}}}},"summary":"List the followed webchannels","tags":["followed webchannels"]}},"/user/follows/webchannels/{webchannel_id}":{"delete":{"responses":{"200":{"description":"the webchannel is now unfollowed"},"404":{"description":"this webchannel was not followed"}},"summary":"Unfollow a webchannel","tags":["followed webchannels"]},"get":{"responses":{"200":{"description":"The followed webchannel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebchannelFollow"}}}},"404":{"description":"this webchannel is not followed"}},"summary":"Check if a webchannel is followed","tags":["followed webchannels"]},"parameters":[{"in":"path","name":"webchannel_id","required":true,"schema":{"type":"integer"}}],"put":{"responses":{"200":{"description":"this webchannel is now followed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebchannelFollow"}}}},"404":{"description":"this webchannel does not exist"}},"summary":"Follow a webchannel","tags":["followed webchannels"]}},"/user/tags":{"get":{"responses":{"200":{"description":"An array of tags","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Tag"},"type":"array"}}}}},"summary":"List all tags","tags":["tagged shows"]},"post":{"requestBody":{"$ref":"#/components/requestBodies/Tag"},"responses":{"200":{"description":"The newly created tag","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tag"}}}},"422":{"description":"invalid input data"}},"summary":"Create a new tag","tags":["tagged shows"]}},"/user/tags/{tag_id}":{"delete":{"parameters":[{"in":"path","name":"tag_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"The tag was deleted"},"404":{"description":"The tag does not exist"}},"summary":"Delete a specific tag","tags":["tagged shows"]},"patch":{"parameters":[{"in":"path","name":"tag_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"$ref":"#/components/requestBodies/Tag"},"responses":{"200":{"description":"The tag was updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tag"}}}},"404":{"description":"The tag does not exist"}},"summary":"Update a specific tag","tags":["tagged shows"]}},"/user/tags/{tag_id}/shows":{"get":{"parameters":[{"in":"path","name":"tag_id","required":true,"schema":{"type":"integer"}},{"description":"Embed full show info","in":"query","name":"embed","required":false,"schema":{"type":"string","enum":["show"]}}],"responses":{"200":{"description":"A list of tagged shows","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/TagInstance"},"type":"array"}}}},"404":{"description":"The tag does not exist"}},"summary":"List all shows under this tag","tags":["tagged shows"]}},"/user/tags/{tag_id}/shows/{show_id}":{"delete":{"parameters":[{"in":"path","name":"tag_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"show_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"The show was untagged"},"404":{"description":"The show was not tagged"}},"summary":"Untag a show","tags":["tagged shows"]},"put":{"parameters":[{"in":"path","name":"tag_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"show_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"The show was tagged","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TagInstance"}}}},"404":{"description":"The show or tag does not exist"}},"summary":"Tag a show","tags":["tagged shows"]}},"/user/votes/episodes":{"get":{"responses":{"200":{"description":"An array of episode votes","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/EpisodeVote"},"type":"array"}}}}},"summary":"List the episodes voted for","tags":["voted episodes"]}},"/user/votes/episodes/{episode_id}":{"delete":{"responses":{"200":{"description":"The episode vote is now removed"},"404":{"description":"This episode was not voted for"}},"summary":"Remove an episode vote","tags":["voted episodes"]},"get":{"responses":{"200":{"description":"The episode vote","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EpisodeVote"}}}},"404":{"description":"This episode is not voted for"}},"summary":"Check if an episode is voted for","tags":["voted episodes"]},"parameters":[{"in":"path","name":"episode_id","required":true,"schema":{"type":"integer"}}],"put":{"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EpisodeVote"}}}},"responses":{"200":{"description":"This episode is now voted for","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EpisodeVote"}}}},"404":{"description":"This episode does not exist"}},"summary":"Vote for an episode","tags":["voted episodes"]}},"/user/votes/shows":{"get":{"parameters":[{"description":"Embed full show info","in":"query","name":"embed","required":false,"schema":{"type":"string","enum":["show"]}}],"responses":{"200":{"description":"An array of show votes","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ShowVote"},"type":"array"}}}}},"summary":"List the shows voted for","tags":["voted shows"]}},"/user/votes/shows/{show_id}":{"delete":{"responses":{"200":{"description":"The show vote is now removed"},"404":{"description":"This show was not voted for"}},"summary":"Remove a show vote","tags":["voted shows"]},"get":{"responses":{"200":{"description":"The show vote","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShowVote"}}}},"404":{"description":"This show is not voted for"}},"summary":"Check if a show is voted for","tags":["voted shows"]},"parameters":[{"in":"path","name":"show_id","required":true,"schema":{"type":"integer"}}],"put":{"description":"Set `voted_at` to `NULL` or leave it out to use the current time.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShowVote"}}}},"responses":{"200":{"description":"This show is now voted for","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShowVote"}}}},"404":{"description":"This show does not exist"}},"summary":"Vote for a show","tags":["voted shows"]}}},"servers":[{"url":"https://api.tvmaze.com/v1"},{"url":"http://api.tvmaze.com/v1"}],"components":{"requestBodies":{"Tag":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tag"}}}}},"securitySchemes":{"usertoken":{"type":"http","scheme":"basic"}},"schemas":{"EpisodeVote":{"properties":{"episode_id":{"readOnly":true,"type":"integer"},"vote":{"description":"The vote number","maximum":10,"minimum":1,"type":"integer"},"voted_at":{"description":"Epoch timestamp for when the user voted for the episode","readOnly":true,"type":"integer"}},"type":"object"},"MarkedEpisode":{"properties":{"episode_id":{"readOnly":true,"type":"integer"},"marked_at":{"description":"Epoch timestamp for when the user watched the episode, or 0 for unknown.","type":"integer"},"type":{"description":"0 for watched, 1 for acquired, 2 for skipped","enum":[0,1,2],"type":"integer"}},"type":"object"},"Network":{"type":"object"},"NetworkFollow":{"properties":{"_embedded":{"properties":{"network":{"$ref":"#/components/schemas/Network"}},"type":"object"},"network_id":{"type":"integer"}},"type":"object"},"Person":{"type":"object"},"PersonFollow":{"properties":{"_embedded":{"properties":{"person":{"$ref":"#/components/schemas/Person"}},"type":"object"},"person_id":{"type":"integer"}},"type":"object"},"Show":{"type":"object"},"ShowFollow":{"properties":{"_embedded":{"properties":{"show":{"$ref":"#/components/schemas/Show"}},"type":"object"},"show_id":{"type":"integer"}},"type":"object"},"ShowVote":{"properties":{"show_id":{"readOnly":true,"type":"integer"},"vote":{"description":"The vote number","maximum":10,"minimum":1,"type":"integer"},"voted_at":{"description":"Epoch timestamp for when the user voted for the episode","readOnly":true,"type":"integer"}},"type":"object"},"Tag":{"properties":{"id":{"readOnly":true,"type":"integer"},"name":{"type":"string"}},"type":"object"},"TagInstance":{"properties":{"_embedded":{"properties":{"show":{"$ref":"#/components/schemas/Show"}},"type":"object"},"show_id":{"type":"integer"}},"type":"object"},"Webchannel":{"type":"object"},"WebchannelFollow":{"properties":{"_embedded":{"properties":{"webchannel":{"$ref":"#/components/schemas/Webchannel"}},"type":"object"},"webchannel_id":{"type":"integer"}},"type":"object"}}}}