ETVDB  0.6.0
ETVDB is a tool and a library to get data from The TV Database (TVDB)
Functions
Episodes

Overall Episode Functions. More...

Functions

EAPI Eina_List * etvdb_episodes_get (Series *s)
 Get all Episodes of a Series. More...
 
EAPI Episodeetvdb_episode_airs_next_get (Series *s, char *date)
 Get the Episode that airs next. More...
 
EAPI Episodeetvdb_episode_by_date_get (Series *s, const char *date)
 Get episode data for a specific date. More...
 
EAPI Episodeetvdb_episode_by_id_get (uint32_t id, Series **s)
 Get episode data for one specific Episode. More...
 
EAPI Episodeetvdb_episode_by_number_get (Series *s, int season, int episode)
 Get episode data for one specific Episode. More...
 
EAPI void etvdb_episode_free (Episode *e)
 Free a Episode structure. More...
 
EAPI Episodeetvdb_episode_from_series_get (Series *s, int season, int episode)
 Get Episode data from Series data. More...
 
EAPI Episodeetvdb_episode_latest_aired_get (Series *s, char *date)
 Get the Episode that aired most recently. More...
 

Detailed Description

Overall Episode Functions.

These functions retrieve general episode data

Function Documentation

EAPI Episode* etvdb_episode_airs_next_get ( Series s,
char *  date 
)

Get the Episode that airs next.

This function returns the Episode that airs next after today or a given date.

The date string has to be in an ISO 8601 format and contain only the date. Behaviour for any other input is undefined. Example: 2013-03-28

Parameters
sSeries data
datea string containing an ISO 8601 date or NULL for today
Returns
the Episode that airs next after today or a given date
NULL on failure
EAPI Episode* etvdb_episode_by_date_get ( Series s,
const char *  date 
)

Get episode data for a specific date.

This function will retrieve the data for one episode, that first aired at a specific date.

It will NOT fetch any data, so the passed Series structure has to be fully initialized, e.g. with etvdb_series_by_id_get.

Parameters
sFully initialized TVDB Series structure.
datea ISO 8601 date string, e.g. "2014-05-25"
Returns
a fully initialized Episode structure on success,
NULL on failure.
EAPI Episode* etvdb_episode_by_id_get ( uint32_t  id,
Series **  s 
)

Get episode data for one specific Episode.

This function will retreive the data for one episode, according to its episode ID.

You may notice that unlike all other episode functions this one uses the Series argument differently. This is intentional, because this function is unique in that it can initialize a Series structure on it's own, since the TVDB Episode ID does not require to know the Series beforehand.

Parameters
idTVDB ID of a episode
sTVDB Series structure. If necessary it will be initialized. May NOT be NULL!
Returns
a Episode structure on success,
NULL on failure.
EAPI Episode* etvdb_episode_by_number_get ( Series s,
int  season,
int  episode 
)

Get episode data for one specific Episode.

This function will retreive the data for one episode, according to its season and episode number.

Parameters
sinitialized TVDB Series structure
seasonseason number of the episode
episodeepisode number in the season
Returns
a Episode structure on success,
NULL on failure.
EAPI void etvdb_episode_free ( Episode e)

Free a Episode structure.

This function frees a Episode structure and its data. Note that a referenced parent series won't be freed.

Parameters
epointer to Episode structure
EAPI Episode* etvdb_episode_from_series_get ( Series s,
int  season,
int  episode 
)

Get Episode data from Series data.

This function will return a pointer to Episode data inside a initialized Series struct. It can also get special episode by passing 0 as season number.

Parameters
sSeries data
seasonseason number, 0 for specials
episodeepisode number
Returns
pointer to episode structure on success
NULL on failure
EAPI Episode* etvdb_episode_latest_aired_get ( Series s,
char *  date 
)

Get the Episode that aired most recently.

This function returns the Episode that initially aired last before today or a given date.

The date string has to be in an ISO 8601 format and contain only the date. Behaviour for any other input is undefined. Example: 2013-03-28

Parameters
sSeries data
datea string containing an ISO 8601 date or NULL for today
Returns
the Episode aired latest
NULL on failure
EAPI Eina_List* etvdb_episodes_get ( Series s)

Get all Episodes of a Series.

This function takes a etvdb Series struct and retrieves all episodes for this series. This list will contain all episodes without being structured as seasons. If you don't require the list specifically, it is suggested to use etvdb_series_populate() instead.

Parameters
sinitialized TVDB Series structure
Returns
a list containing all episodes of a series.