Tvdb 0.3.0

Tvdb::Client Class Reference

An asyncronous client to the thetvdb.com API. More...

#include <tvdb/client.h>

Inheritance diagram for Tvdb::Client:

List of all members.

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 ()

Detailed Description

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.

Author:
Sebastian Trueg <trueg@kde.org>

Definition at line 46 of file client.h.


Member Enumeration Documentation

Enumerator:
NoFlags 
FetchFullDetails 

always fetch the full details of all series, even if there are multiple matches

Definition at line 61 of file client.h.


Constructor & Destructor Documentation

Tvdb::Client::Client ( QObject parent = 0)

Create a new client.

Tvdb::Client::~Client ( )

Destructor.


Member Function Documentation

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.

Parameters:
nameThe 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.

Parameters:
seriesA 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.

The documentation for this class was generated from the following file:

Get libtvdb at SourceForge.net. Fast, secure and Free Open Source software downloads
LibTvdb documentation generated by doxygen