From 1440e9da7b83bb649aff90af3cdfe9433416c988 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20P=C3=B6sel?= Date: Sun, 20 Dec 2015 05:38:13 +0000 Subject: 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 --- protocols/Steam/src/api/search.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'protocols/Steam/src/api') 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"); } }; -- cgit v1.2.3