4.2 KiB
4.2 KiB
board_mate.message.MessageApi
All URIs are relative to https://boardmate_api
| Method | HTTP request | Description |
|---|---|---|
| history | GET /message/history/{clientId} | GET message/history/{clientId} |
| post_message | POST /message/send | POST message/send |
history
ResponseBodyString history(client_id, top=top)
GET message/history/{clientId}
Example
import time
import os
import board_mate.message
from board_mate.message.models.response_body_string import ResponseBodyString
from board_mate.message.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://boardmate_api
# See configuration.py for a list of all supported configuration parameters.
configuration = board_mate.message.Configuration(
host = "https://boardmate_api"
)
# Enter a context with an instance of the API client
with board_mate.message.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = board_mate.message.MessageApi(api_client)
client_id = 'client_id_example' # str |
top = 20 # int | (optional) (default to 20)
try:
# GET message/history/{clientId}
api_response = api_instance.history(client_id, top=top)
print("The response of MessageApi->history:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling MessageApi->history: %s\n" % e)
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| client_id | str | ||
| top | int | [optional] [default to 20] |
Return type
Authorization
No authorization required
HTTP request headers
- Content-Type: Not defined
- Accept: /
HTTP response details
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
post_message
ResponseBodyString post_message(message_post_request_dto)
POST message/send
Example
import time
import os
import board_mate.message
from board_mate.message.models.message_post_request_dto import MessagePostRequestDto
from board_mate.message.models.response_body_string import ResponseBodyString
from board_mate.message.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://boardmate_api
# See configuration.py for a list of all supported configuration parameters.
configuration = board_mate.message.Configuration(
host = "https://boardmate_api"
)
# Enter a context with an instance of the API client
with board_mate.message.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = board_mate.message.MessageApi(api_client)
message_post_request_dto = board_mate.message.MessagePostRequestDto() # MessagePostRequestDto |
try:
# POST message/send
api_response = api_instance.post_message(message_post_request_dto)
print("The response of MessageApi->post_message:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling MessageApi->post_message: %s\n" % e)
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| message_post_request_dto | MessagePostRequestDto |
Return type
Authorization
No authorization required
HTTP request headers
- Content-Type: application/json
- Accept: /
HTTP response details
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]