TheTVDB.com

Online TV Database
It is currently Sun Dec 21, 2014 9:22 am

All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: SeriesID
PostPosted: Tue Mar 20, 2012 10:34 am 
Offline

Joined: Tue Mar 20, 2012 10:28 am
Posts: 2
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


Top
 Profile  
 
 Post subject: Re: SeriesID
PostPosted: Tue Mar 20, 2012 4:00 pm 
Offline
Site Admin

Joined: Tue Mar 13, 2007 10:16 pm
Posts: 2232
Location: Canada
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.


Top
 Profile  
 
 Post subject: Re: SeriesID
PostPosted: Tue Mar 20, 2012 11:41 pm 
Offline
Site Admin

Joined: Fri Nov 03, 2006 5:23 pm
Posts: 2192
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.


Top
 Profile  
 
 Post subject: Re: SeriesID
PostPosted: Wed Mar 21, 2012 1:03 am 
Offline
Site Admin

Joined: Tue Mar 13, 2007 10:16 pm
Posts: 2232
Location: Canada
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.


Top
 Profile  
 
 Post subject: Re: SeriesID
PostPosted: Wed Mar 21, 2012 5:57 am 
Offline

Joined: Tue Mar 20, 2012 10:28 am
Posts: 2
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?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group