summaryrefslogtreecommitdiff
path: root/protocols/Steam/src/api/search.h
blob: e9e9691cc1660a8ba50c1d3d139cb5c659a69851 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#ifndef _STEAM_REQUEST_SEARCH_H_
#define _STEAM_REQUEST_SEARCH_H_

class SearchRequest : public HttpRequest
{
public:
	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)));
		AddParameter("offset=%d", offset);
		AddParameter("count=%d", count);
		AddParameter("targets=users&fields=all");
	}
};

#endif //_STEAM_REQUEST_SEARCH_H_