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

struct SendMessageRequest : public HttpRequest
{
	SendMessageRequest(const char *token, const char *umqId, const char *steamId, const char *text) :
		HttpRequest(REQUEST_POST, "/ISteamWebUserPresenceOAuth/Message/v0001")
	{
		this << CHAR_PARAM("access_token", token) << CHAR_PARAM("umqid", umqId) << CHAR_PARAM("steamid_dst", steamId) 
			<< CHAR_PARAM("type", "saytext") << CHAR_PARAM("text", text);
	}
};

struct SendTypingRequest : public HttpRequest
{
	SendTypingRequest(const char *token, const char *umqId, const char *steamId) :
		HttpRequest(REQUEST_POST, "/ISteamWebUserPresenceOAuth/Message/v0001")
	{
		this << CHAR_PARAM("access_token", token) << CHAR_PARAM("umqid", umqId) << CHAR_PARAM("steamid_dst", steamId) << CHAR_PARAM("type", "typing");
	}
};

#endif //_STEAM_REQUEST_MESSAGE_H_