summaryrefslogtreecommitdiff
path: root/protocols/Steam/src/api/message.h
blob: eee4c43b28cfebceba8829ed553e9a5ffe431891 (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
27
28
29
30
31
32
33
#ifndef _STEAM_REQUEST_MESSAGE_H_
#define _STEAM_REQUEST_MESSAGE_H_

class SendMessageRequest : public HttpRequest
{
public:
	SendMessageRequest(const char *token, const char *umqId, const char *steamId, const char *text) :
		HttpRequest(HttpPost, STEAM_API_URL "/ISteamWebUserPresenceOAuth/Message/v0001")
	{
		Content = new FormUrlEncodedContent(this)
			<< CHAR_PARAM("access_token", token)
			<< CHAR_PARAM("umqid", umqId)
			<< CHAR_PARAM("steamid_dst", steamId)
			<< CHAR_PARAM("type", "saytext")
			<< CHAR_PARAM("text", text);
	}
};

class SendTypingRequest : public HttpRequest
{
public:
	SendTypingRequest(const char *token, const char *umqId, const char *steamId) :
		HttpRequest(HttpPost, STEAM_API_URL "/ISteamWebUserPresenceOAuth/Message/v0001")
	{
		Content = new FormUrlEncodedContent(this)
			<< CHAR_PARAM("access_token", token)
			<< CHAR_PARAM("umqid", umqId)
			<< CHAR_PARAM("steamid_dst", steamId)
			<< CHAR_PARAM("type", "typing");
	}
};

#endif //_STEAM_REQUEST_MESSAGE_H_