Skip to content

Latest commit

 

History

History
137 lines (104 loc) · 4.04 KB

File metadata and controls

137 lines (104 loc) · 4.04 KB

WerewolfAPI.Api.ChatApi

All URIs are relative to https://project-ile.net:1038/v1

Method HTTP request Description
ChatGameIDSessionIDChatIDGet GET /chat/{gameID}/{sessionID}/{chatID} Retrieve list of chat messages
ChatGameIDSessionIDPost POST /chat/{gameID}/{sessionID} Post a message to game

ChatGameIDSessionIDChatIDGet

List ChatGameIDSessionIDChatIDGet (int? gameID, string sessionID, int? chatID)

Retrieve list of chat messages

Example

using System;
using System.Diagnostics;
using WerewolfAPI.Api;
using WerewolfAPI.Client;
using WerewolfAPI.Model;

namespace Example
{
    public class ChatGameIDSessionIDChatIDGetExample
    {
        public void main()
        {
            var apiInstance = new ChatApi();
            var gameID = 56;  // int? | ID of game to perform action
            var sessionID = sessionID_example;  // string | ID of player'session to perform chat
            var chatID = 56;  // int? | First chat message ID to retrieve

            try
            {
                // Retrieve list of chat messages
                List<ChatMessage> result = apiInstance.ChatGameIDSessionIDChatIDGet(gameID, sessionID, chatID);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ChatApi.ChatGameIDSessionIDChatIDGet: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
gameID int? ID of game to perform action
sessionID string ID of player'session to perform chat
chatID int? First chat message ID to retrieve

Return type

List

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

ChatGameIDSessionIDPost

void ChatGameIDSessionIDPost (long? gameID, string sessionID, ChatMessage body)

Post a message to game

Post a message to game

Example

using System;
using System.Diagnostics;
using WerewolfAPI.Api;
using WerewolfAPI.Client;
using WerewolfAPI.Model;

namespace Example
{
    public class ChatGameIDSessionIDPostExample
    {
        public void main()
        {
            var apiInstance = new ChatApi();
            var gameID = 789;  // long? | ID of game to perform action
            var sessionID = sessionID_example;  // string | ID of player'session to perform chat
            var body = new ChatMessage(); // ChatMessage | Chat message object to post to the game

            try
            {
                // Post a message to game
                apiInstance.ChatGameIDSessionIDPost(gameID, sessionID, body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ChatApi.ChatGameIDSessionIDPost: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
gameID long? ID of game to perform action
sessionID string ID of player'session to perform chat
body ChatMessage Chat message object to post to the game

Return type

void (empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]