diff --git a/README.rst b/README.rst index cb1d770e7..9d09ff15a 100644 --- a/README.rst +++ b/README.rst @@ -253,6 +253,30 @@ See https://box-content.readme.io/#as-user-1 for more information about how this # Same thing, but using file's as_user method client.file(file_id='SOME_FILE_ID').as_user(user).rename('bar-2.txt') +Other Requests +~~~~~~~~~~~~~~ + +The Box API is continually evolving. As such, there are API endpoints available that are not specifically +supported by the SDK. You can still use these endpoints by using the ``make_request`` method of the ``Client``. + +.. code-block:: python + + # https://box-content.readme.io/reference#get-metadata-schema + from boxsdk.config import API + # Returns a Python dictionary containing the result of the API request + json_response = client.make_request( + 'GET', + '{0}/metadata_templates/enterprise/customer/schema'.format(API.BASE_API_URL), + ).json() + +``make_request()`` takes two parameters: + +- ``method`` -an HTTP verb like ``GET`` or ``POST`` +- ``url`` - the URL of the requested API endpoint + +``boxsdk.config.API`` is an object specifying which URLs to use in order to access the Box API. It can be used for +formatting the URLs to use with ``make_request``. Box objects also have a ``get_url`` method. Pass it an endpoint +to get the correct URL for use with that object and endpoint. Box Developer Edition --------------------- diff --git a/setup.py b/setup.py index b3dc95085..f9b3f53cc 100644 --- a/setup.py +++ b/setup.py @@ -61,7 +61,7 @@ def main(): install_requires.append('ordereddict>=1.1') setup( name='boxsdk', - version='1.4.1', + version='1.4.2', description='Official Box Python SDK', long_description=open(join(base_dir, 'README.rst')).read(), author='Box',