amsync/obj.py
async def _req(
    method:     str,
    url:        str,
    data:       dict[str, Any] | None = None,
    need_dumps: bool                  = True
) -> Res:
    """
    Create a request for the amino api

    Headers are automatically inserted into the request

    #### need_dumps
    If need use ujson.dumps on the data
    """

    res = await Req.new(
        method  = method,
        url     = API + url,
        data    = dumps(data) if need_dumps else data,
        headers = headers
    )

    api_status_code = res.json['api:statuscode']

    if not res.ok and api_status_code and api_status_code not in ignore_codes:
        raise AminoSays(f"{res.json['api:message']}. Code: {api_status_code}")
    return res

    Create a request for the amino api

    Headers are automatically inserted into the request

    #### need_dumps
    If need use ujson.dumps on the data
    
Create a request for the amino api
Headers are automatically inserted into the request

need_dumps
If need use ujson.dumps on the data
Create a request for the amino api Headers are automatically inserted into the request need_dumps If need use ujson . dumps on the data
async def _req(
    method:     str,
    url:        str,
    data:       dict[str, Any] | None = None,
    need_dumps: bool                  = True
) -> Res:
    res = await Req.new(
        method  = method,
        url     = API + url,
        data    = dumps(data) if need_dumps else data,
        headers = headers
    )
    api_status_code = res.json['api:statuscode']
    if not res.ok and api_status_code and api_status_code not in ignore_codes:
        raise AminoSays(f"{res.json['api:message']}. Code: {api_status_code}")
    return res
async def _req ( method : str , url : str , data : dict [ str , Any ] | None = None , need_dumps : bool = True ) -> Res : res = await Req . new ( method = method , url = API + url , data = dumps ( data ) if need_dumps else data , headers = headers ) api_status_code = res . json [ 'api:statuscode' ] if not res . ok and api_status_code and api_status_code not in ignore_codes : raise AminoSays ( f"{res.json['api:message']}. Code: {api_status_code}" ) return res
Create a request for the amino api
Headers are automatically inserted into the request
Create a request for the amino api Headers are automatically inserted into the request
"""
    Create a request for the amino api

    Headers are automatically inserted into the request

    #### need_dumps
    If need use ujson.dumps on the data
    """
method
str
url
str
data
dict[str, Any] | None
need_dumps
bool