Tvdb 0.3.0
|
An asyncronous client to the thetvdb.com API. More...
#include <tvdb/client.h>
Public Types | |
enum | TvdbFlag { NoFlags = 0, FetchFullDetails = 1 } |
Public Slots | |
void | setApiKey (const QString &key) |
void | setFlags (TvdbFlags flags) |
void | getSeriesByName (const QString &name) |
void | getSeriesById (int id) |
Signals | |
void | finished (const Tvdb::Series &series) |
void | multipleResultsFound (const QList< Tvdb::Series > &series) |
Public Member Functions | |
Client (QObject *parent=0) | |
~Client () |
An asyncronous client to the thetvdb.com API.
Using the client is very easy: Create a new instance, connect to the finished() and the multipleResultsFound() signals and then call getSeriesByName() or getSeriesById(). The result will be an instance of Series which contains all the information fetched from the tvdb web service.
Tvdb::Client::Client | ( | QObject * | parent = 0 | ) |
Create a new client.
Tvdb::Client::~Client | ( | ) |
Destructor.
void Tvdb::Client::setApiKey | ( | const QString & | key | ) | [slot] |
Set a custom thetvdb API key.
void Tvdb::Client::setFlags | ( | TvdbFlags | flags | ) | [slot] |
Set flags to be used in the client.
void Tvdb::Client::getSeriesByName | ( | const QString & | name | ) | [slot] |
Search a series by name. This will result in either a finished() signal or a multipleResultsFound() signal to be emitted.
name | The name of the series or part of it. |
void Tvdb::Client::getSeriesById | ( | int | id | ) | [slot] |
Get a series by id. This will result in the finished() signal being emitted.
void Tvdb::Client::finished | ( | const Tvdb::Series & | series | ) | [signal] |
Emitted once a series has been found. In case of an error an empty series is returned.
void Tvdb::Client::multipleResultsFound | ( | const QList< Tvdb::Series > & | series | ) | [signal] |
Emitted if multiple matches have been found in a getSeriesByName call.
series | A list of matching series without and season or episode information. Use Tvdb::Series::id() in getSeriesById() to get the final Series data. This can be done automatically by specifying the FetchFullDetails flag. |
LibTvdb documentation generated by doxygen | |