SeriesID

A place for developers to advertise their TheTVDB.com enabled app and get help from other developers with the API.
dape82
Posts: 2
Joined: Tue Mar 20, 2012 10:28 am

SeriesID

Postby dape82 » Tue Mar 20, 2012 10:34 am

Hallo,

When searching with GetSeries there is an id tag and a SeriesID tag. Both contain the same number.
When fetching the series by this id, the result will contain id and SeriesID too but with different numbers.
Why that? What is the difference between id and SerieID?

Greedings,
Daniel

Coco
Site Admin
Posts: 2390
Joined: Tue Mar 13, 2007 10:16 pm
Location: Canada

Re: SeriesID

Postby Coco » Tue Mar 20, 2012 4:00 pm

ID shouldn't show in the GetSeries search. The reason for the different names is because of the DB design though. In general our tables have a field called ID as their PK. This is poorly done because then when we make foreign keys we have to name them properly so while the seriesID is called ID in the series table. In the episodes table it's called seriesID because ID is being used for the episodeID.

It's just poor DB naming that is shinning through in the API. So in your case their different because you're no longer looking at records from the series table.
Please don't PM me. Post in the forums instead unless there is a very good reason for a PM or I won't respond.

szsori
Site Admin
Posts: 2223
Joined: Fri Nov 03, 2006 5:23 pm

Re: SeriesID

Postby szsori » Tue Mar 20, 2012 11:41 pm

I thought one was the TV.com id. I seriously thought id was our own internal id which is also used for our foreign keys while SeriesID was from TV.com.

Coco
Site Admin
Posts: 2390
Joined: Tue Mar 13, 2007 10:16 pm
Location: Canada

Re: SeriesID

Postby Coco » Wed Mar 21, 2012 1:03 am

In the series table itself seriesID is the tv.com ID. But you don't have to mention that here as that brilliant piece of naming isn't reflected in the api. seriesID is only the tv.com ID when in the series table. In other tables seriesID matchs ID in our series table. :P Only me and you have to worry about that. Or anyone trying to work with our DB dumps.

ID never used to be a field on GetSeries. It's not even mentioned in our documentation. I'm not sure when it got added but as far as I know it really shouldn't be there. I'd be reluctant to remove it though as many people are likely using it.
Please don't PM me. Post in the forums instead unless there is a very good reason for a PM or I won't respond.

dape82
Posts: 2
Joined: Tue Mar 20, 2012 10:28 am

Re: SeriesID

Postby dape82 » Wed Mar 21, 2012 5:57 am

So if I understand you correctly, when searching the id tag is the correct tvdb id (but it should be renamed to SeriesID for consistency in the API). The current SeriesID tag is the id of TV.com (should be renamed to tv_com_id or somethink like that in my opinion). In other requests the SeriesID tag refers to the id of the series table (FK) and that is the correct tvdb id.
Right?


Return to “Developers”

Who is online

Users browsing this forum: No registered users and 1 guest