コード例 #1
0
 def email(cls, resource_id, user=None, token=None, api_base=None,
           api_version=None, **json):
     requestor = APIRequestor(
         user=user,
         token=token,
         api_base=api_base,
         api_version=api_version,
     )
     url = cls.class_url() + str(resource_id) + "/email/"
     response = requestor.request(
         method="post",
         url=url,
         json=json,
     )
     return response
コード例 #2
0
 def delete(cls, resource_id, user=None, token=None, api_base=None,
            api_version=None, **params):
     requestor = APIRequestor(
         user=user,
         token=token,
         api_base=api_base,
         api_version=api_version,
     )
     url = cls.class_url() + str(resource_id)
     response = requestor.request(
         method="delete",
         url=url,
         params=params,
     )
     return response
コード例 #3
0
 def create(cls,
            user=None,
            token=None,
            api_base=None,
            api_version=None,
            **json):
     requestor = APIRequestor(
         user=user,
         token=token,
         api_base=api_base,
         api_version=api_version,
     )
     url = cls.class_url()
     response = requestor.request(
         method="post",
         url=url,
         json=json,
     )
     return response
コード例 #4
0
 def list(cls,
          user=None,
          token=None,
          api_base=None,
          api_version=None,
          **params):
     requestor = APIRequestor(
         user=user,
         token=token,
         api_base=api_base,
         api_version=api_version,
     )
     url = cls.class_url()
     response = requestor.request(
         method="get",
         url=url,
         params=params,
     )
     return response