Update message endpoint
This commit is contained in:
@@ -34,3 +34,4 @@ from board_mate.message.exceptions import ApiException
|
||||
from board_mate.message.models.message_dto import MessageDto
|
||||
from board_mate.message.models.message_post_request_dto import MessagePostRequestDto
|
||||
from board_mate.message.models.response_body_list_message_dto import ResponseBodyListMessageDto
|
||||
from board_mate.message.models.response_body_string import ResponseBodyString
|
||||
|
||||
@@ -20,10 +20,10 @@ from pydantic import validate_arguments, ValidationError
|
||||
|
||||
from pydantic import StrictInt, StrictStr
|
||||
|
||||
from typing import List, Optional
|
||||
from typing import Optional
|
||||
|
||||
from board_mate.message.models.message_post_request_dto import MessagePostRequestDto
|
||||
from board_mate.message.models.response_body_list_message_dto import ResponseBodyListMessageDto
|
||||
from board_mate.message.models.response_body_string import ResponseBodyString
|
||||
|
||||
from board_mate.message.api_client import ApiClient
|
||||
from board_mate.message.api_response import ApiResponse
|
||||
@@ -46,7 +46,7 @@ class MessageApi:
|
||||
self.api_client = api_client
|
||||
|
||||
@validate_arguments
|
||||
def history(self, client_id : StrictStr, top : Optional[StrictInt] = None, **kwargs) -> List[ResponseBodyListMessageDto]: # noqa: E501
|
||||
def history(self, client_id : StrictStr, top : Optional[StrictInt] = None, **kwargs) -> ResponseBodyString: # noqa: E501
|
||||
"""GET message/history/{clientId} # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
@@ -68,7 +68,7 @@ class MessageApi:
|
||||
:return: Returns the result object.
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
:rtype: List[ResponseBodyListMessageDto]
|
||||
:rtype: ResponseBodyString
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if '_preload_content' in kwargs:
|
||||
@@ -112,7 +112,7 @@ class MessageApi:
|
||||
:return: Returns the result object.
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
:rtype: tuple(List[ResponseBodyListMessageDto], status_code(int), headers(HTTPHeaderDict))
|
||||
:rtype: tuple(ResponseBodyString, status_code(int), headers(HTTPHeaderDict))
|
||||
"""
|
||||
|
||||
_params = locals()
|
||||
@@ -171,7 +171,7 @@ class MessageApi:
|
||||
_auth_settings = [] # noqa: E501
|
||||
|
||||
_response_types_map = {
|
||||
'200': "List[ResponseBodyListMessageDto]",
|
||||
'200': "ResponseBodyString",
|
||||
}
|
||||
|
||||
return self.api_client.call_api(
|
||||
@@ -192,7 +192,7 @@ class MessageApi:
|
||||
_request_auth=_params.get('_request_auth'))
|
||||
|
||||
@validate_arguments
|
||||
def post_message(self, message_post_request_dto : MessagePostRequestDto, **kwargs) -> str: # noqa: E501
|
||||
def post_message(self, message_post_request_dto : MessagePostRequestDto, **kwargs) -> ResponseBodyString: # noqa: E501
|
||||
"""POST message/send # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
@@ -212,7 +212,7 @@ class MessageApi:
|
||||
:return: Returns the result object.
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
:rtype: str
|
||||
:rtype: ResponseBodyString
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if '_preload_content' in kwargs:
|
||||
@@ -254,7 +254,7 @@ class MessageApi:
|
||||
:return: Returns the result object.
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
:rtype: tuple(str, status_code(int), headers(HTTPHeaderDict))
|
||||
:rtype: tuple(ResponseBodyString, status_code(int), headers(HTTPHeaderDict))
|
||||
"""
|
||||
|
||||
_params = locals()
|
||||
@@ -316,7 +316,7 @@ class MessageApi:
|
||||
_auth_settings = [] # noqa: E501
|
||||
|
||||
_response_types_map = {
|
||||
'200': "str",
|
||||
'200': "ResponseBodyString",
|
||||
}
|
||||
|
||||
return self.api_client.call_api(
|
||||
|
||||
@@ -17,3 +17,4 @@
|
||||
from board_mate.message.models.message_dto import MessageDto
|
||||
from board_mate.message.models.message_post_request_dto import MessagePostRequestDto
|
||||
from board_mate.message.models.response_body_list_message_dto import ResponseBodyListMessageDto
|
||||
from board_mate.message.models.response_body_string import ResponseBodyString
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
boardmate_api API
|
||||
|
||||
boardmate_api API
|
||||
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
import pprint
|
||||
import re # noqa: F401
|
||||
import json
|
||||
|
||||
|
||||
from typing import Optional
|
||||
from pydantic import BaseModel, StrictBool, StrictStr
|
||||
|
||||
class ResponseBodyString(BaseModel):
|
||||
"""
|
||||
ResponseBodyString
|
||||
"""
|
||||
data: Optional[StrictStr] = None
|
||||
message: Optional[StrictStr] = None
|
||||
success: Optional[StrictBool] = None
|
||||
__properties = ["data", "message", "success"]
|
||||
|
||||
class Config:
|
||||
"""Pydantic configuration"""
|
||||
allow_population_by_field_name = True
|
||||
validate_assignment = True
|
||||
|
||||
def to_str(self) -> str:
|
||||
"""Returns the string representation of the model using alias"""
|
||||
return pprint.pformat(self.dict(by_alias=True))
|
||||
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
return json.dumps(self.to_dict())
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> ResponseBodyString:
|
||||
"""Create an instance of ResponseBodyString from a JSON string"""
|
||||
return cls.from_dict(json.loads(json_str))
|
||||
|
||||
def to_dict(self):
|
||||
"""Returns the dictionary representation of the model using alias"""
|
||||
_dict = self.dict(by_alias=True,
|
||||
exclude={
|
||||
},
|
||||
exclude_none=True)
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: dict) -> ResponseBodyString:
|
||||
"""Create an instance of ResponseBodyString from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return ResponseBodyString.parse_obj(obj)
|
||||
|
||||
_obj = ResponseBodyString.parse_obj({
|
||||
"data": obj.get("data"),
|
||||
"message": obj.get("message"),
|
||||
"success": obj.get("success")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
Reference in New Issue
Block a user