summaryrefslogtreecommitdiff
path: root/protocols/Steam/src/api/search.h
blob: 64ff7e828f802906f8f425878c1c6c93879b60f1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#ifndef _STEAM_REQUEST_SEARCH_H_
#define _STEAM_REQUEST_SEARCH_H_

struct SearchRequest : public HttpRequest
{
	SearchRequest(const char *token, const char *text, int offset = 0, int count = 30) :
		HttpRequest(REQUEST_GET, "/ISteamUserOAuth/Search/v0001")
	{
		this << CHAR_PARAM("access_token", token) << CHAR_PARAM("keywords", text) << INT_PARAM("offset", offset)
			<< INT_PARAM("count", count) << CHAR_PARAM("targets", "users") << CHAR_PARAM("fields", "all");
	}

	//{
	//	"count": 1,
	//	"total" : 336,
	//	"success" : true,
	//	"results" : [
	//		{
	//			"steamid": "XXXXXXXXXXXXXXXXX",
	//			"type" : "user"
	//		}
	//	]
	//}
};

#endif //_STEAM_REQUEST_SEARCH_H_