Try 30 days of free premium.

User-level API


david wrote 7 years ago: 1

As you might have read, the upcoming TVmaze Premium packages will include user-level API access.

The user API will launch the 26th at the latest, but I wanted to give everyone the chance to provide feedback beforehand, while it's still possible to make changes.

Check out the documentation at http://tvmazecdn.com/apidoc/ and let me know if you have feedback about any aspect. Note that followed networks & web channels are omitted for brevity, but will be included in the final version.


gazza911 wrote 7 years ago: 1

In PUT /user/episodes/{episode_id} why is there a created_at parameter?

If necessary for the DB to log the time they marked it, then surely this should be done server, rather than client side.

Also, for the same endpoint, you've got episode_id in the URL and separately in the body.


david wrote 7 years ago: 1

Thanks!

Perhaps I should rename created_at to something more generic. It's writeable to allow you to specify when you watched, acquired or skipped this episode. People who are very peculiar about their stats page will appreciate it. :)

episode_id isn't actually permitted input, it's a read-only attribute. It's just not possible to make Swagger hide it completely when the model is used as input.


wkremser wrote 7 years ago: 1

i couldnt find the api key in my dashboard, am i missing something here or am i simply blind ;)


Jan wrote 7 years ago: 1

wkremser wrote:
i couldnt find the api key in my dashboard, am i missing something here or am i simply blind ;)

Premium and the user API will only go live on the 26th. :)


wkremser wrote 7 years ago: 1

aah .. i thought i could start playing around in the swagger ui ... so the documentation there is a little bit misleading until the 26th :)


gazza911 wrote 7 years ago: 1

wkremser wrote:
aah .. i thought i could start playing around in the swagger ui ... so the documentation there is a little bit misleading until the 26th :)

Not really; "The user API will be released on or before September 26th. Until then, the schema is subject to change and calls will not yet work."


wkremser wrote 7 years ago: 1

i am pretty sure this wasnt there when i read it the first time ..


david wrote 7 years ago: 1

What do you think about what you can see so far?

srob650 wrote 7 years ago: 1

Looks cool so far, it would be awesome for us developers to get access to the premium features so we can integrate them into our projects. It's early days but this new feature set seems ripe for Plex integration. I can't wait to test with this stuff live!


gazza911 wrote 7 years ago: 1

Just had another look at it. One thing I think you're missing from the User API is the ability to rate shows/episodes.


david wrote 7 years ago: 1

gazza911 wrote:
Just had another look at it. One thing I think you're missing from the User API is the ability to rate shows/episodes.

I'll happily add this. (Can't promise before the 26th though)

srob650 wrote 7 years ago: 1

Question:

What is the point of "Get a followed show" and "Get a followed person" and "Get a marked episode"? It seems as though these are just returning the same data as if you were to use the normal API methods to get a show/person/episode. If the point is just to check to see whether or not a show/person is followed or episode is marked then I think the wording is slightly confusing and should read something like "Check if show is followed". Or maybe it's just me :p

srob650 wrote 7 years ago: 1

In the examples for people the responses have {... "_embedded"{ "show": {} } ...} in them instead of {... "_embedded"{ "person": {} } ...}. Also, in the marked episodes responses, what is "type"? I was expecting to see the ability to embed the episode there instead. Will we have that option?


david wrote 7 years ago: 1

srob650 wrote:
What is the point of "Get a followed show" and "Get a followed person" and "Get a marked episode"? It seems as though these are just returning the same data as if you were to use the normal API methods to get a show/person/episode. If the point is just to check to see whether or not a show/person is followed or episode is marked then I think the wording is slightly confusing and should read something like "Check if show is followed". Or maybe it's just me :p

Indeed, these endpoints retrieve "the follows object" or "the mark object", not the show/person/episode itself. In practice they'll be used if you want to check if you've already followed/marked a specific item. I'll think about updating the description like you said, this might be a little confusing indeed.


david wrote 7 years ago: 1

srob650 wrote:
In the examples for people the responses have {... "_embedded"{ "show": {} } ...} in them instead of {... "_embedded"{ "person": {} } ...}. Also, in the marked episodes responses, what is "type"? I was expecting to see the ability to embed the episode there instead. Will we have that option?

Yeah, that's a typo, it'll be fixed.

If you click the "model" tab instead of the "example value" tab, you can see the documentation for the "type" field.

I didn't provide the possibility of embedding an episode in /user/episodes because it could lead to extremely large responses. Some people here have marked tens of thousands of episodes; embedding them all would probably crash your client. :)


gazza911 wrote 7 years ago: 1

david wrote:
Some people here have marked tens of thousands of episodes; embedding them all would probably crash your client. :)

It's still possible to crash the client if you have enough marked objects - have you considered putting it in paginated format (for example 5000 marked episodes - probably around 0.3MB - per page).

srob650 wrote 7 years ago: 1

david wrote:
Yeah, that's a typo, it'll be fixed.
If you click the "model" tab instead of the "example value" tab, you can see the documentation for the "type" field.
I didn't provide the possibility of embedding an episode in /user/episodes because it could lead to extremely large responses. Some people here have marked tens of thousands of episodes; embedding them all would probably crash your client. :)

Cool, I get it now. Thanks!

srob650 wrote 7 years ago: 1

Is there a reason that doing the singular GET's such as a /user/follows/shows/{show_id} or /user/episodes/{episode_id} returns a list when presumably it would just be one episode?


david wrote 7 years ago: 1

srob650 wrote:
Is there a reason that doing the singular GET's such as a /user/follows/shows/{show_id} or /user/episodes/{episode_id} returns a list when presumably it would just be one episode?

No, that's a typo. Thanks!

Try 30 days of free premium.