Artist.h | Artist.h | |||
---|---|---|---|---|
skipping to change at line 88 | skipping to change at line 88 | |||
Name, | Name, | |||
Results, | Results, | |||
Description, | Description, | |||
FuzzyMatch, | FuzzyMatch, | |||
MaxFamiliarity, | MaxFamiliarity, | |||
MinFamiliarity, | MinFamiliarity, | |||
MaxHotttnesss, | MaxHotttnesss, | |||
MinHotttnesss, | MinHotttnesss, | |||
Reverse, | Reverse, | |||
Sort, | Sort, | |||
IdSpace | IdSpace, | |||
Mood | ||||
}; | }; | |||
typedef QPair< Echonest::Artist::SearchParam, QVariant > SearchPara mEntry; | typedef QPair< Echonest::Artist::SearchParam, QVariant > SearchPara mEntry; | |||
typedef QVector< SearchParamEntry > SearchParams; | typedef QVector< SearchParamEntry > SearchParams; | |||
Artist(); | Artist(); | |||
Artist( const QByteArray& id, const QString& name ); | Artist( const QByteArray& id, const QString& name ); | |||
explicit Artist( const QString& name ); | explicit Artist( const QString& name ); | |||
explicit Artist( const QByteArray& id ); | explicit Artist( const QByteArray& id ); | |||
Artist( const Artist& other ); | Artist( const Artist& other ); | |||
skipping to change at line 328 | skipping to change at line 329 | |||
* | * | |||
*/ | */ | |||
static QNetworkReply* topHottt( ArtistInformation information = Art istInformation(), int numResults = 0, int offset = -1, bool limit = false ) ; | static QNetworkReply* topHottt( ArtistInformation information = Art istInformation(), int numResults = 0, int offset = -1, bool limit = false ) ; | |||
/** | /** | |||
* Fetch a list of the top overall terms. | * Fetch a list of the top overall terms. | |||
*/ | */ | |||
static QNetworkReply* topTerms( int numResults = 15 ); | static QNetworkReply* topTerms( int numResults = 15 ); | |||
/** | /** | |||
* Suggest artists based on a partial name. | ||||
* | ||||
* \param results How many results to return, between 0 and 15. Def | ||||
ault is 10 | ||||
*/ | ||||
static QNetworkReply* suggest( const QString& name, int results = 1 | ||||
0 ); | ||||
/** | ||||
* Returns a list of terms of the given type, for use in other call | ||||
s. | ||||
* | ||||
* \param type Which type of term to return, at the moment only 'st | ||||
yle' or 'mood' | ||||
*/ | ||||
static QNetworkReply* listTerms( const QString& type = "style" ); | ||||
/** | ||||
* Parse the result of a fetchSimilar() call, which returns a list of artists similar to the | * Parse the result of a fetchSimilar() call, which returns a list of artists similar to the | |||
* original pair. | * original pair. | |||
*/ | */ | |||
static Artists parseSimilar( QNetworkReply* ) throw( ParseError ); | static Artists parseSimilar( QNetworkReply* ) throw( ParseError ); | |||
/** | /** | |||
* Parse the result of an artist search. | * Parse the result of an artist search. | |||
*/ | */ | |||
static Artists parseSearch( QNetworkReply* ) throw( ParseError ); | static Artists parseSearch( QNetworkReply* ) throw( ParseError ); | |||
/** | /** | |||
* Parse the result of a top hottness query. | * Parse the result of a top hottness query. | |||
*/ | */ | |||
static Artists parseTopHottt( QNetworkReply* ) throw( ParseError ); | static Artists parseTopHottt( QNetworkReply* ) throw( ParseError ); | |||
/** | /** | |||
* Parse the result of a top terms query. | * Parse the result of a top terms query. | |||
*/ | */ | |||
static TermList parseTopTerms( QNetworkReply* ) throw( ParseError ) ; | static TermList parseTopTerms( QNetworkReply* ) throw( ParseError ) ; | |||
/** | ||||
* Parse the result of a suggest query | ||||
* | ||||
* Returns a list of suggested artists | ||||
*/ | ||||
static Artists parseSuggest( QNetworkReply* ) throw( ParseError ); | ||||
/** | ||||
* Parse the result of a termList query. Returns the list of values | ||||
returned. | ||||
*/ | ||||
static QVector< QString > parseTermList( QNetworkReply* ) throw( Pa | ||||
rseError ); | ||||
private: | private: | |||
QUrl setupQuery( const QByteArray& methodName, int numResults = 0, int start = -1 ) const; | QUrl setupQuery( const QByteArray& methodName, int numResults = 0, int start = -1 ) const; | |||
static QByteArray searchParamToString( SearchParam param ); | static QByteArray searchParamToString( SearchParam param ); | |||
static void addQueryInformation( QUrl& url, ArtistInformation infor mation ); | static void addQueryInformation( QUrl& url, ArtistInformation infor mation ); | |||
QSharedDataPointer<ArtistData> d; | QSharedDataPointer<ArtistData> d; | |||
friend class Catalog; | friend class Catalog; | |||
}; | }; | |||
End of changes. 3 change blocks. | ||||
1 lines changed or deleted | 34 lines changed or added | |||
Playlist.h | Playlist.h | |||
---|---|---|---|---|
skipping to change at line 71 | skipping to change at line 71 | |||
* the current song, and can fetch the next song. | * the current song, and can fetch the next song. | |||
* | * | |||
* See http://developer.echonest.com/docs/v4/playlist.html#dynamic | * See http://developer.echonest.com/docs/v4/playlist.html#dynamic | |||
* for more information | * for more information | |||
*/ | */ | |||
class ECHONEST_EXPORT DynamicPlaylist | class ECHONEST_EXPORT DynamicPlaylist | |||
{ | { | |||
public: | public: | |||
/** | /** | |||
* The types of playlist that can be generated. Artist plays songs for the given artist, | * The types of playlist that can be generated. Artist plays songs for the given artist, | |||
* ArtistRadio takes into account similar artists, adn ArtistDescr iption plays songs matching | * ArtistRadio takes into account similar artists, and ArtistDescr iption plays songs matching | |||
* the given description. | * the given description. | |||
*/ | */ | |||
enum ArtistTypeEnum { | enum ArtistTypeEnum { | |||
ArtistType, | ArtistType, | |||
ArtistRadioType, | ArtistRadioType, | |||
ArtistDescriptionType, | ArtistDescriptionType, | |||
CatalogType, | CatalogType, | |||
CatalogRadioType, | CatalogRadioType, | |||
SongRadioType | SongRadioType | |||
}; | }; | |||
skipping to change at line 174 | skipping to change at line 174 | |||
ArtistMaxLongitude, /// -180.0 < longitude < 180.0 the max imum longitude for the location of artists in the playlist | ArtistMaxLongitude, /// -180.0 < longitude < 180.0 the max imum longitude for the location of artists in the playlist | |||
ArtistMinLatitude, /// -90.0 < latitude < 90.0 the minimum lat itude for the location of artists in the playlist | ArtistMinLatitude, /// -90.0 < latitude < 90.0 the minimum lat itude for the location of artists in the playlist | |||
ArtistMaxLatitude, /// -90.0 < latitude < 90.0 the maximum lati tude for the location of artists in the playlist | ArtistMaxLatitude, /// -90.0 < latitude < 90.0 the maximum lati tude for the location of artists in the playlist | |||
Mode, /// (minor, major) 0, 1 the mode of songs in the play list | Mode, /// (minor, major) 0, 1 the mode of songs in the play list | |||
Key, /// (c, c-sharp, d, e-flat, e, f, f-sharp, g, a-flat, a, b -flat, b) 0 - 11 the key of songs in the playlist | Key, /// (c, c-sharp, d, e-flat, e, f, f-sharp, g, a-flat, a, b -flat, b) 0 - 11 the key of songs in the playlist | |||
SongInformation, /// what sort of song information should be re turned. Should be an Echonest::SongInformation object | SongInformation, /// what sort of song information should be re turned. Should be an Echonest::SongInformation object | |||
Sort, /// SortingType enum, the type of sorting to use, | Sort, /// SortingType enum, the type of sorting to use, | |||
Limit, /// true, false if true songs will be limited to thos e that appear in the catalog specified by the id: bucket | Limit, /// true, false if true songs will be limited to thos e that appear in the catalog specified by the id: bucket | |||
Audio, /// true, false, if true songs will be limited to those that have associated audio | Audio, /// true, false, if true songs will be limited to those that have associated audio | |||
DMCA, /// true, false Only valid for dynamic playlists. Sets if playlist will follow DMCA rules (see web api doc for details) | DMCA, /// true, false Only valid for dynamic playlists. Sets if playlist will follow DMCA rules (see web api doc for details) | |||
ChainXSPF /// true, false If true, returns an xspf for this | ChainXSPF, /// true, false If true, returns an xspf for this | |||
dynamic playlist with 2 items. The second item will be a link to the API ca | dynamic playlist with 2 items. The second item will be a link to the API c | |||
ll for the next track in the chain. Please note that this sidesteps libecho | all for the next track in the chain. Please note that this sidesteps libech | |||
nest's handling of the tracks. | onest's handling of the tracks. | |||
Mood, /// A mood to limit this playlist to, for example "happy" | ||||
or "sad". Multiples of this param are okay. See the method Artist::listTer | ||||
ms for details on what moods are currently available | ||||
Style /// A style to limit this playlist to, for example "happy | ||||
" or "sad". Multiples of this param are okay. See the method Artist::listTe | ||||
rms for details on what styles are currently available | ||||
}; | }; | |||
typedef QPair< PlaylistParam, QVariant > PlaylistParamData; | typedef QPair< PlaylistParam, QVariant > PlaylistParamData; | |||
typedef QVector< PlaylistParamData > PlaylistParams; | typedef QVector< PlaylistParamData > PlaylistParams; | |||
/** | /** | |||
* The various controls for a dynamic playlist. | * The various controls for a dynamic playlist. | |||
* | * | |||
* Please see The Echo Nest API documentation for more information | * Please see The Echo Nest API documentation for more information | |||
*/ | */ | |||
End of changes. 2 change blocks. | ||||
5 lines changed or deleted | 11 lines changed or added | |||