Game Development Reference
In-Depth Information
How to do it…
1.
We would like to keep up with the latest photo trends, so we want to fetch a list of the
most upvoted images, or a list of the most recently added images. To access such lists,
Flickr provides the flickr.interestingness.getList and flickr.photos.
getRecent methods, and Picasa provides two RSS feeds: featured and all . The
example screenshot of the recent photos in the Flickr RSS feed is as follows:
2.
To form the required URLs for Flickr and Picasa, we implement two functions.
One for Flickr:
std::string Flickr_GetListURL( const std::string& BaseURL,
int MaxResults,
int PageIndex,
const std::string& SearchQuery )
{
std::string Result = BaseURL + std::string( "&api_key=" );
Result += AppKey;
if ( !SearchQuery.empty() )
{
Result += std::string( "&q=\"" ) +
SearchQuery + std::string( "\"" );
}
Result += std::string( "&per_page=" );
Result += IntToStr( MaxResults );
 
Search WWH ::




Custom Search