libmygpo-qt
 All Classes Functions
Public Types | Static Public Member Functions | List of all members
mygpo::UrlBuilder Class Reference

Helper class to generate request URL's. More...

#include <UrlBuilder.h>

Public Types

enum  Format { JSON, OPML, TEXT, XML }
 

Static Public Member Functions

static QString getToplistUrl (uint i, Format f=JSON)
 
static QString getSuggestionsUrl (uint i, Format f=JSON)
 
static QString getPodcastSearchUrl (const QString &query, Format f=JSON)
 
static QString getSubscriptionsUrl (const QString &username, const QString &device, Format f=JSON)
 
static QString getTopTagsUrl (uint i)
 
static QString getPodcastsOfTagUrl (const QString &tag, uint i)
 
static QString getPodcastDataUrl (const QString &url)
 
static QString getEpisodeDataUrl (const QString &podcastUrl, const QString &episodeUrl)
 
static QString getFavEpisodesUrl (const QString &username)
 
static QString getAddRemoveSubUrl (const QString &username, const QString &deviceId)
 
static QString getAccountSettingsUrl (const QString &username)
 
static QString getDeviceSettingsUrl (const QString &username, const QString &deviceId)
 
static QString getPodcastSettingsUrl (const QString &username, const QString &podcastUrl)
 
static QString getEpisodeSettingsUrl (const QString &username, const QString &podcastUrl, const QString &episodeUrl)
 
static QString getDeviceListUrl (const QString &username)
 
static QString getRenameDeviceUrl (const QString &username, const QString &deviceId)
 
static QString getDeviceUpdatesUrl (const QString &username, const QString &deviceId, qulonglong timestamp)
 
static QString getEpisodeActionsUrl (const QString &username, bool aggregated)
 
static QString getEpisodeActionsUrlByPodcast (const QString &username, const QString &podcastUrl, bool aggregated)
 
static QString getEpisodeActionsUrlByDevice (const QString &username, const QString &deviceId, bool aggregated)
 
static QString getEpisodeActionsUrlByTimestamp (const QString &username, qulonglong since)
 
static QString getEpisodeActionsUrlByPodcastAndTimestamp (const QString &username, const QString &podcastUrl, qulonglong since)
 
static QString getEpisodeActionsUrlByDeviceAndTimestamp (const QString &username, const QString &deviceId, qulonglong since)
 
static QString getUploadEpisodeActionsUrl (const QString &username)
 
static QString getDeviceSynchronizationStatusUrl (const QString &username)
 

Detailed Description

Helper class to generate request URL's.

Helps to generate URL's for the gpodder requests. This class uses the singleton pattern, to retrieve a reference to the singleton object use the function instance().

Member Function Documentation

static QString mygpo::UrlBuilder::getAddRemoveSubUrl ( const QString &  username,
const QString &  deviceId 
)
static
Parameters
usernameUser name (gpodder.net). You need to be logged in with username.
deviceIdThe id of the device.
Returns
Request URL to to update the subscription list for a given device.
static QString mygpo::UrlBuilder::getEpisodeDataUrl ( const QString &  podcastUrl,
const QString &  episodeUrl 
)
static
Parameters
podcastUrlURL of the podcast
episodeUrlURL of the episode that belongs to the podcast-url
Returns
Request URL to retrieve information about the episode with the given episode-url.
static QString mygpo::UrlBuilder::getFavEpisodesUrl ( const QString &  username)
static
Parameters
usernameUser name (gpodder.net). You need to be logged in with username.
Returns
Request URL to retrieve a list of all favorite episodes.
static QString mygpo::UrlBuilder::getPodcastDataUrl ( const QString &  url)
static
Parameters
urlThe URL of the podcast
Returns
Request URL to retrieve information about the podcast with the given url.
static QString mygpo::UrlBuilder::getPodcastSearchUrl ( const QString &  query,
Format  f = JSON 
)
static
Parameters
queryThe query to search in the podcasts name/descrption.
Returns
Request URL to retrieve podcasts related to the query.
static QString mygpo::UrlBuilder::getPodcastsOfTagUrl ( const QString &  tag,
uint  i 
)
static
Parameters
iAmount of podcasts. If i == 0 it will be set to 1.
Returns
Request URL to retrieve the 'i' most-subscribed podcats that are tagged with tag.
static QString mygpo::UrlBuilder::getSuggestionsUrl ( uint  i,
Format  f = JSON 
)
static
Parameters
iAny value between 1..100. If i <= 0 it will be set to 1.
Returns
Rquest URL to retrieve 'i' podcast suggestions.
static QString mygpo::UrlBuilder::getToplistUrl ( uint  i,
Format  f = JSON 
)
static
Parameters
iAny value between 1..100. If i <= 0 it will be set to 1.
Returns
Request URL to retrieve a list of the top 'i' podcasts.
static QString mygpo::UrlBuilder::getTopTagsUrl ( uint  i)
static
Parameters
iAmount of tags. If i == 0 it will be set to 1.
Returns
Request URL to retrieve the 'i' most used tags.

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