summaryrefslogtreecommitdiff
path: root/protocols/Steam/src/api/search.h
diff options
context:
space:
mode:
authorRobert Pösel <robyer@seznam.cz>2015-12-20 05:38:13 +0000
committerRobert Pösel <robyer@seznam.cz>2015-12-20 05:38:13 +0000
commit1440e9da7b83bb649aff90af3cdfe9433416c988 (patch)
tree631b1ead3df9f2f793ef65b4ac199b42640c35be /protocols/Steam/src/api/search.h
parent3973fc0ef6292ab81d193a927f1e4cea4e447dfd (diff)
Steam: Implement searching by keywords
Like by name or nickname, but it doesn't matter in which input user writes the text, it is searched as a whole combined string separated by spaces. git-svn-id: http://svn.miranda-ng.org/main/trunk@15908 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Steam/src/api/search.h')
-rw-r--r--protocols/Steam/src/api/search.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/protocols/Steam/src/api/search.h b/protocols/Steam/src/api/search.h
index ed1b0420eb..e9e9691cc1 100644
--- a/protocols/Steam/src/api/search.h
+++ b/protocols/Steam/src/api/search.h
@@ -4,13 +4,14 @@
class SearchRequest : public HttpRequest
{
public:
- SearchRequest(const char *token, const char *text) :
+ SearchRequest(const char *token, const char *text, int offset = 0, int count = 30) :
HttpRequest(REQUEST_GET, STEAM_API_URL "/ISteamUserOAuth/Search/v0001")
{
AddParameter("access_token", token);
AddParameter("keywords", ptrA(mir_urlEncode(text)));
- // todo: may need to load all results (15 first at now)
- AddParameter("offset=0&count=15&targets=users&fields=all");
+ AddParameter("offset=%d", offset);
+ AddParameter("count=%d", count);
+ AddParameter("targets=users&fields=all");
}
};