summaryrefslogtreecommitdiff
path: root/protocols/Steam/src/api/message.h
blob: 934bdc875e34a6872c65e2ce4faf4f7d5acce27f (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(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);
	}
};

class SendTypingRequest : public HttpRequest
{
public:
	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_