docusign_esign.apis.data_feed_api

DocuSign REST API

The DocuSign REST API provides you with a powerful, convenient, and simple Web services API for interacting with DocuSign. # noqa: E501

OpenAPI spec version: v2.1 Contact: devcenter@docusign.com Generated by: https://github.com/swagger-api/swagger-codegen.git

  1# coding: utf-8
  2
  3"""
  4    DocuSign REST API
  5
  6    The DocuSign REST API provides you with a powerful, convenient, and simple Web services API for interacting with DocuSign.  # noqa: E501
  7
  8    OpenAPI spec version: v2.1
  9    Contact: devcenter@docusign.com
 10    Generated by: https://github.com/swagger-api/swagger-codegen.git
 11"""
 12
 13
 14from __future__ import absolute_import
 15
 16import sys
 17import os
 18import re
 19
 20# python 2 and python 3 compatibility library
 21from six import iteritems
 22
 23from ..client.configuration import Configuration
 24from ..client.api_client import ApiClient
 25
 26
 27class DataFeedApi(object):
 28    """
 29    NOTE: This class is auto generated by the swagger code generator program.
 30    Do not edit the class manually.
 31    Ref: https://github.com/swagger-api/swagger-codegen
 32    """
 33
 34    def __init__(self, api_client=None):
 35        config = Configuration()
 36        if api_client:
 37            self.api_client = api_client
 38        else:
 39            if not config.api_client:
 40                config.api_client = ApiClient()
 41            self.api_client = config.api_client
 42
 43    def get_data_feed_element(self, account_id, data_feed_element_id, **kwargs):
 44        """
 45        Retrieves a Datafeed element by Id.
 46        This method makes a synchronous HTTP request by default. To make an
 47        asynchronous HTTP request, please define a `callback` function
 48        to be invoked when receiving the response.
 49        >>> def callback_function(response):
 50        >>>     pprint(response)
 51        >>>
 52        >>> thread = api.get_data_feed_element(account_id, data_feed_element_id, callback=callback_function)
 53
 54        :param callback function: The callback function
 55            for asynchronous request. (optional)
 56        :param str account_id: The external account number (int) or account ID Guid. (required)
 57        :param str data_feed_element_id: (required)
 58        :return: None
 59                 If the method is called asynchronously,
 60                 returns the request thread.
 61        """
 62        kwargs['_return_http_data_only'] = True
 63        if kwargs.get('callback'):
 64            return self.get_data_feed_element_with_http_info(account_id, data_feed_element_id, **kwargs)
 65        else:
 66            (data) = self.get_data_feed_element_with_http_info(account_id, data_feed_element_id, **kwargs)
 67            return data
 68
 69    def get_data_feed_element_with_http_info(self, account_id, data_feed_element_id, **kwargs):
 70        """
 71        Retrieves a Datafeed element by Id.
 72        This method makes a synchronous HTTP request by default. To make an
 73        asynchronous HTTP request, please define a `callback` function
 74        to be invoked when receiving the response.
 75        >>> def callback_function(response):
 76        >>>     pprint(response)
 77        >>>
 78        >>> thread = api.get_data_feed_element_with_http_info(account_id, data_feed_element_id, callback=callback_function)
 79
 80        :param callback function: The callback function
 81            for asynchronous request. (optional)
 82        :param str account_id: The external account number (int) or account ID Guid. (required)
 83        :param str data_feed_element_id: (required)
 84        :return: None
 85                 If the method is called asynchronously,
 86                 returns the request thread.
 87        """
 88
 89        all_params = ['account_id', 'data_feed_element_id']
 90        all_params.append('callback')
 91        all_params.append('_return_http_data_only')
 92        all_params.append('_preload_content')
 93        all_params.append('_request_timeout')
 94
 95        params = locals()
 96        for key, val in iteritems(params['kwargs']):
 97            if key not in all_params:
 98                raise TypeError(
 99                    "Got an unexpected keyword argument '%s'"
100                    " to method get_data_feed_element" % key
101                )
102            params[key] = val
103        del params['kwargs']
104        # verify the required parameter 'account_id' is set
105        if ('account_id' not in params) or (params['account_id'] is None):
106            raise ValueError("Missing the required parameter `account_id` when calling `get_data_feed_element`")
107        # verify the required parameter 'data_feed_element_id' is set
108        if ('data_feed_element_id' not in params) or (params['data_feed_element_id'] is None):
109            raise ValueError("Missing the required parameter `data_feed_element_id` when calling `get_data_feed_element`")
110
111
112        collection_formats = {}
113
114        resource_path = '/v2.1/accounts/{accountId}/data_feeds/data/{dataFeedElementId}'.replace('{format}', 'json')
115        path_params = {}
116        if 'account_id' in params:
117            path_params['accountId'] = params['account_id']
118        if 'data_feed_element_id' in params:
119            path_params['dataFeedElementId'] = params['data_feed_element_id']
120
121        query_params = {}
122
123        header_params = {}
124
125        form_params = []
126        local_var_files = {}
127
128        body_params = None
129        # HTTP header `Accept`
130        header_params['Accept'] = self.api_client.\
131            select_header_accept(['application/json'])
132
133        # Authentication setting
134        auth_settings = []
135
136        return self.api_client.call_api(resource_path, 'GET',
137                                        path_params,
138                                        query_params,
139                                        header_params,
140                                        body=body_params,
141                                        post_params=form_params,
142                                        files=local_var_files,
143                                        response_type=None,
144                                        auth_settings=auth_settings,
145                                        callback=params.get('callback'),
146                                        _return_http_data_only=params.get('_return_http_data_only'),
147                                        _preload_content=params.get('_preload_content', True),
148                                        _request_timeout=params.get('_request_timeout'),
149                                        collection_formats=collection_formats)
class DataFeedApi:
 28class DataFeedApi(object):
 29    """
 30    NOTE: This class is auto generated by the swagger code generator program.
 31    Do not edit the class manually.
 32    Ref: https://github.com/swagger-api/swagger-codegen
 33    """
 34
 35    def __init__(self, api_client=None):
 36        config = Configuration()
 37        if api_client:
 38            self.api_client = api_client
 39        else:
 40            if not config.api_client:
 41                config.api_client = ApiClient()
 42            self.api_client = config.api_client
 43
 44    def get_data_feed_element(self, account_id, data_feed_element_id, **kwargs):
 45        """
 46        Retrieves a Datafeed element by Id.
 47        This method makes a synchronous HTTP request by default. To make an
 48        asynchronous HTTP request, please define a `callback` function
 49        to be invoked when receiving the response.
 50        >>> def callback_function(response):
 51        >>>     pprint(response)
 52        >>>
 53        >>> thread = api.get_data_feed_element(account_id, data_feed_element_id, callback=callback_function)
 54
 55        :param callback function: The callback function
 56            for asynchronous request. (optional)
 57        :param str account_id: The external account number (int) or account ID Guid. (required)
 58        :param str data_feed_element_id: (required)
 59        :return: None
 60                 If the method is called asynchronously,
 61                 returns the request thread.
 62        """
 63        kwargs['_return_http_data_only'] = True
 64        if kwargs.get('callback'):
 65            return self.get_data_feed_element_with_http_info(account_id, data_feed_element_id, **kwargs)
 66        else:
 67            (data) = self.get_data_feed_element_with_http_info(account_id, data_feed_element_id, **kwargs)
 68            return data
 69
 70    def get_data_feed_element_with_http_info(self, account_id, data_feed_element_id, **kwargs):
 71        """
 72        Retrieves a Datafeed element by Id.
 73        This method makes a synchronous HTTP request by default. To make an
 74        asynchronous HTTP request, please define a `callback` function
 75        to be invoked when receiving the response.
 76        >>> def callback_function(response):
 77        >>>     pprint(response)
 78        >>>
 79        >>> thread = api.get_data_feed_element_with_http_info(account_id, data_feed_element_id, callback=callback_function)
 80
 81        :param callback function: The callback function
 82            for asynchronous request. (optional)
 83        :param str account_id: The external account number (int) or account ID Guid. (required)
 84        :param str data_feed_element_id: (required)
 85        :return: None
 86                 If the method is called asynchronously,
 87                 returns the request thread.
 88        """
 89
 90        all_params = ['account_id', 'data_feed_element_id']
 91        all_params.append('callback')
 92        all_params.append('_return_http_data_only')
 93        all_params.append('_preload_content')
 94        all_params.append('_request_timeout')
 95
 96        params = locals()
 97        for key, val in iteritems(params['kwargs']):
 98            if key not in all_params:
 99                raise TypeError(
100                    "Got an unexpected keyword argument '%s'"
101                    " to method get_data_feed_element" % key
102                )
103            params[key] = val
104        del params['kwargs']
105        # verify the required parameter 'account_id' is set
106        if ('account_id' not in params) or (params['account_id'] is None):
107            raise ValueError("Missing the required parameter `account_id` when calling `get_data_feed_element`")
108        # verify the required parameter 'data_feed_element_id' is set
109        if ('data_feed_element_id' not in params) or (params['data_feed_element_id'] is None):
110            raise ValueError("Missing the required parameter `data_feed_element_id` when calling `get_data_feed_element`")
111
112
113        collection_formats = {}
114
115        resource_path = '/v2.1/accounts/{accountId}/data_feeds/data/{dataFeedElementId}'.replace('{format}', 'json')
116        path_params = {}
117        if 'account_id' in params:
118            path_params['accountId'] = params['account_id']
119        if 'data_feed_element_id' in params:
120            path_params['dataFeedElementId'] = params['data_feed_element_id']
121
122        query_params = {}
123
124        header_params = {}
125
126        form_params = []
127        local_var_files = {}
128
129        body_params = None
130        # HTTP header `Accept`
131        header_params['Accept'] = self.api_client.\
132            select_header_accept(['application/json'])
133
134        # Authentication setting
135        auth_settings = []
136
137        return self.api_client.call_api(resource_path, 'GET',
138                                        path_params,
139                                        query_params,
140                                        header_params,
141                                        body=body_params,
142                                        post_params=form_params,
143                                        files=local_var_files,
144                                        response_type=None,
145                                        auth_settings=auth_settings,
146                                        callback=params.get('callback'),
147                                        _return_http_data_only=params.get('_return_http_data_only'),
148                                        _preload_content=params.get('_preload_content', True),
149                                        _request_timeout=params.get('_request_timeout'),
150                                        collection_formats=collection_formats)

NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. Ref: https://github.com/swagger-api/swagger-codegen

DataFeedApi(api_client=None)
35    def __init__(self, api_client=None):
36        config = Configuration()
37        if api_client:
38            self.api_client = api_client
39        else:
40            if not config.api_client:
41                config.api_client = ApiClient()
42            self.api_client = config.api_client
def get_data_feed_element(self, account_id, data_feed_element_id, **kwargs)
44    def get_data_feed_element(self, account_id, data_feed_element_id, **kwargs):
45        """
46        Retrieves a Datafeed element by Id.
47        This method makes a synchronous HTTP request by default. To make an
48        asynchronous HTTP request, please define a `callback` function
49        to be invoked when receiving the response.
50        >>> def callback_function(response):
51        >>>     pprint(response)
52        >>>
53        >>> thread = api.get_data_feed_element(account_id, data_feed_element_id, callback=callback_function)
54
55        :param callback function: The callback function
56            for asynchronous request. (optional)
57        :param str account_id: The external account number (int) or account ID Guid. (required)
58        :param str data_feed_element_id: (required)
59        :return: None
60                 If the method is called asynchronously,
61                 returns the request thread.
62        """
63        kwargs['_return_http_data_only'] = True
64        if kwargs.get('callback'):
65            return self.get_data_feed_element_with_http_info(account_id, data_feed_element_id, **kwargs)
66        else:
67            (data) = self.get_data_feed_element_with_http_info(account_id, data_feed_element_id, **kwargs)
68            return data

Retrieves a Datafeed element by Id. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.get_data_feed_element(account_id, data_feed_element_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str data_feed_element_id: (required)
Returns

None If the method is called asynchronously, returns the request thread.

def get_data_feed_element_with_http_info(self, account_id, data_feed_element_id, **kwargs)
 70    def get_data_feed_element_with_http_info(self, account_id, data_feed_element_id, **kwargs):
 71        """
 72        Retrieves a Datafeed element by Id.
 73        This method makes a synchronous HTTP request by default. To make an
 74        asynchronous HTTP request, please define a `callback` function
 75        to be invoked when receiving the response.
 76        >>> def callback_function(response):
 77        >>>     pprint(response)
 78        >>>
 79        >>> thread = api.get_data_feed_element_with_http_info(account_id, data_feed_element_id, callback=callback_function)
 80
 81        :param callback function: The callback function
 82            for asynchronous request. (optional)
 83        :param str account_id: The external account number (int) or account ID Guid. (required)
 84        :param str data_feed_element_id: (required)
 85        :return: None
 86                 If the method is called asynchronously,
 87                 returns the request thread.
 88        """
 89
 90        all_params = ['account_id', 'data_feed_element_id']
 91        all_params.append('callback')
 92        all_params.append('_return_http_data_only')
 93        all_params.append('_preload_content')
 94        all_params.append('_request_timeout')
 95
 96        params = locals()
 97        for key, val in iteritems(params['kwargs']):
 98            if key not in all_params:
 99                raise TypeError(
100                    "Got an unexpected keyword argument '%s'"
101                    " to method get_data_feed_element" % key
102                )
103            params[key] = val
104        del params['kwargs']
105        # verify the required parameter 'account_id' is set
106        if ('account_id' not in params) or (params['account_id'] is None):
107            raise ValueError("Missing the required parameter `account_id` when calling `get_data_feed_element`")
108        # verify the required parameter 'data_feed_element_id' is set
109        if ('data_feed_element_id' not in params) or (params['data_feed_element_id'] is None):
110            raise ValueError("Missing the required parameter `data_feed_element_id` when calling `get_data_feed_element`")
111
112
113        collection_formats = {}
114
115        resource_path = '/v2.1/accounts/{accountId}/data_feeds/data/{dataFeedElementId}'.replace('{format}', 'json')
116        path_params = {}
117        if 'account_id' in params:
118            path_params['accountId'] = params['account_id']
119        if 'data_feed_element_id' in params:
120            path_params['dataFeedElementId'] = params['data_feed_element_id']
121
122        query_params = {}
123
124        header_params = {}
125
126        form_params = []
127        local_var_files = {}
128
129        body_params = None
130        # HTTP header `Accept`
131        header_params['Accept'] = self.api_client.\
132            select_header_accept(['application/json'])
133
134        # Authentication setting
135        auth_settings = []
136
137        return self.api_client.call_api(resource_path, 'GET',
138                                        path_params,
139                                        query_params,
140                                        header_params,
141                                        body=body_params,
142                                        post_params=form_params,
143                                        files=local_var_files,
144                                        response_type=None,
145                                        auth_settings=auth_settings,
146                                        callback=params.get('callback'),
147                                        _return_http_data_only=params.get('_return_http_data_only'),
148                                        _preload_content=params.get('_preload_content', True),
149                                        _request_timeout=params.get('_request_timeout'),
150                                        collection_formats=collection_formats)

Retrieves a Datafeed element by Id. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.get_data_feed_element_with_http_info(account_id, data_feed_element_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str data_feed_element_id: (required)
Returns

None If the method is called asynchronously, returns the request thread.