
#include <qtflickr.h>
Public Member Functions | |
| QtfRequest () | |
| QtfRequest (const QString &tag, const QString &attrs=QString()) | |
Public Attributes | |
| QMap< QString, QString > | requests |
Use this structure to provide information for the XML parser, parser will search only those tags that you have been provided. Request is map container, where key is a tag name and value is a comma delimited list of possible attributes.
Attributes are optional, provide only empty string for tag only request. Example:
<?xml version="1.0" encoding="utf-8" ?> <rsp stat="ok"> <photos page="2" pages="89" perpage="10" total="881"> <photo id="2636" owner="47058503995@N01"/> <photo id="2635" owner="47058503995@N01"/> </photos> </rsp>
Let assume server response is a XML above and you want to get all id's and owner information for the photo list. The code will look like this:
QtfRequest request; request.requests.insert("photo","id,owner"); QtfMethod method; method.method = "flickr.photos.getWithGeoData"; QtFlickr qtFlickr("apiKey","apiSecret"); qtFlickr.get(method, request);
| QtfRequest::QtfRequest | ( | ) | [inline] |
Default constructor
| QtfRequest::QtfRequest | ( | const QString & | tag, | |
| const QString & | attrs = QString() | |||
| ) | [inline] |
Constructs and initialize single request