Skip to content

Commit 9f8c975

Browse files
committed
Merge pull request #118 from Jeff-Meadows/readme
Bump to version 1.4.2.
2 parents 8f0dc49 + d048358 commit 9f8c975

File tree

2 files changed

+25
-1
lines changed

2 files changed

+25
-1
lines changed

README.rst

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,30 @@ See https://box-content.readme.io/#as-user-1 for more information about how this
253253
# Same thing, but using file's as_user method
254254
client.file(file_id='SOME_FILE_ID').as_user(user).rename('bar-2.txt')
255255
256+
Other Requests
257+
~~~~~~~~~~~~~~
258+
259+
The Box API is continually evolving. As such, there are API endpoints available that are not specifically
260+
supported by the SDK. You can still use these endpoints by using the ``make_request`` method of the ``Client``.
261+
262+
.. code-block:: python
263+
264+
# https://box-content.readme.io/reference#get-metadata-schema
265+
from boxsdk.config import API
266+
# Returns a Python dictionary containing the result of the API request
267+
json_response = client.make_request(
268+
'GET',
269+
'{0}/metadata_templates/enterprise/customer/schema'.format(API.BASE_API_URL),
270+
).json()
271+
272+
``make_request()`` takes two parameters:
273+
274+
- ``method`` -an HTTP verb like ``GET`` or ``POST``
275+
- ``url`` - the URL of the requested API endpoint
276+
277+
``boxsdk.config.API`` is an object specifying which URLs to use in order to access the Box API. It can be used for
278+
formatting the URLs to use with ``make_request``. Box objects also have a ``get_url`` method. Pass it an endpoint
279+
to get the correct URL for use with that object and endpoint.
256280

257281
Box Developer Edition
258282
---------------------

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def main():
6161
install_requires.append('ordereddict>=1.1')
6262
setup(
6363
name='boxsdk',
64-
version='1.4.1',
64+
version='1.4.2',
6565
description='Official Box Python SDK',
6666
long_description=open(join(base_dir, 'README.rst')).read(),
6767
author='Box',

0 commit comments

Comments
 (0)