# -*- coding: utf-8 -*-
"""团队相关 API.

auto generated by script at 2017-08-24 21:50:13.459796. don't edit it.

"""
from typing import Any

from attr import NOTHING

from aiobearychat.abc import API
from aiobearychat.sansio import Response, clean_nothing_keys


class TeamAPI(API):
    """团队相关 API."""

    async def info(self,
                   **requester_params: Any) -> Response:
        """返回当前团队信息。

        官方文档地址：https://github.com/bearyinnovative/OpenAPI/blob/master/api/team.info.md



        :return: response. 一个 :class:`aiobearychat.sansio.Response` 实例
        :rtype: :class:`aiobearychat.sansio.Response`

        ``response.body`` 返回值示例::

            response.status 等于 200 时:

                {
                  "id": "=bw52O",
                  "subdomain": "openapi",
                  "name": "BearyChat OpenAPI",
                  "email_domain": null,
                  "logo_url": null,
                  "description": "",
                  "plan": "basic",
                  "created": "2017-01-11T12:28:31.000+0000"
                }

        """
        url_params = {}
        body_params = {}
        url_params['token'] = self._token

        url_params.update({
        })

        url = self.base_url + '/team.info'
        headers = {
            'content-type': 'application/json',
        }

        url_params = clean_nothing_keys(url_params)
        body_params = clean_nothing_keys(body_params)

        body_params = None

        return await self._make_request('get',
                                        url,
                                        url_params=url_params,
                                        body_params=body_params,
                                        headers=headers,
                                        **requester_params)
