Skip to content

Latest commit

 

History

History
178 lines (127 loc) · 4.91 KB

File metadata and controls

178 lines (127 loc) · 4.91 KB

ChatApi

All URIs are relative to https://localhost/api/v1

Method HTTP request Description
chatGet GET /chat Get chat messages.
chatGetChannels GET /chat/channels Get available channels.
chatGetConnected GET /chat/connected Get connected users.
chatNew POST /chat Send a chat message.

chatGet

List<Chat> chatGet(count, start, reverse, channelID)

Get chat messages.

Example

// Import classes:
//import io.swagger.client.api.ChatApi;

ChatApi apiInstance = new ChatApi();
BigDecimal count = new BigDecimal(); // BigDecimal | Number of results to fetch.
BigDecimal start = new BigDecimal(); // BigDecimal | Starting ID for results.
Boolean reverse = true; // Boolean | If true, will sort results newest first.
Double channelID = 3.4D; // Double | Channel id. GET /chat/channels for ids. Leave blank for all.
try {
    List<Chat> result = apiInstance.chatGet(count, start, reverse, channelID);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ChatApi#chatGet");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
count BigDecimal Number of results to fetch. [optional] [default to 100]
start BigDecimal Starting ID for results. [optional] [default to 0]
reverse Boolean If true, will sort results newest first. [optional] [default to true]
channelID Double Channel id. GET /chat/channels for ids. Leave blank for all. [optional]

Return type

List<Chat>

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json, application/x-www-form-urlencoded
  • Accept: application/json, application/xml, text/xml, application/javascript, text/javascript

chatGetChannels

List<ChatChannel> chatGetChannels()

Get available channels.

Example

// Import classes:
//import io.swagger.client.api.ChatApi;

ChatApi apiInstance = new ChatApi();
try {
    List<ChatChannel> result = apiInstance.chatGetChannels();
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ChatApi#chatGetChannels");
    e.printStackTrace();
}

Parameters

This endpoint does not need any parameter.

Return type

List<ChatChannel>

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json, application/x-www-form-urlencoded
  • Accept: application/json, application/xml, text/xml, application/javascript, text/javascript

chatGetConnected

ConnectedUsers chatGetConnected()

Get connected users.

Returns an array with browser users in the first position and API users (bots) in the second position.

Example

// Import classes:
//import io.swagger.client.api.ChatApi;

ChatApi apiInstance = new ChatApi();
try {
    ConnectedUsers result = apiInstance.chatGetConnected();
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ChatApi#chatGetConnected");
    e.printStackTrace();
}

Parameters

This endpoint does not need any parameter.

Return type

ConnectedUsers

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json, application/x-www-form-urlencoded
  • Accept: application/json, application/xml, text/xml, application/javascript, text/javascript

chatNew

Chat chatNew(message, channelID)

Send a chat message.

Example

// Import classes:
//import io.swagger.client.api.ChatApi;

ChatApi apiInstance = new ChatApi();
String message = "message_example"; // String | 
Double channelID = 3.4D; // Double | Channel to post to. Default 1 (English).
try {
    Chat result = apiInstance.chatNew(message, channelID);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ChatApi#chatNew");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
message String
channelID Double Channel to post to. Default 1 (English). [optional] [default to 1]

Return type

Chat

Authorization

apiKey, apiNonce, apiSignature

HTTP request headers

  • Content-Type: application/json, application/x-www-form-urlencoded
  • Accept: application/json, application/xml, text/xml, application/javascript, text/javascript