From 8374720c73d7e64a26cebee06dba435955248a0e Mon Sep 17 00:00:00 2001 From: Jordan Moldow Date: Fri, 19 Aug 2016 10:21:25 -0700 Subject: [PATCH] Prepare for alpha release of 2.0.0 Bump version to 2.0.0a1. Add @kelseymorris95 to AUTHORS. Fix up docstrings for Sphinx, and update docs sources. Clean up release notes. --- AUTHORS.rst | 1 + HISTORY.rst | 9 +++----- boxsdk/exception.py | 12 ++++++++++ boxsdk/network/default_network.py | 1 + boxsdk/object/base_api_json_object.py | 1 + boxsdk/object/cloneable.py | 3 +++ boxsdk/version.py | 2 +- docs/source/boxsdk.object.rst | 32 +++++++++++++++++++++++++++ docs/source/boxsdk.util.rst | 8 +++++++ 9 files changed, 62 insertions(+), 7 deletions(-) diff --git a/AUTHORS.rst b/AUTHORS.rst index f700a0c5f..57dfea77a 100644 --- a/AUTHORS.rst +++ b/AUTHORS.rst @@ -7,3 +7,4 @@ used to interact with the Box API. This is a list of contributors. - `@hnguyen08 `_ - `@potrebic `_ - `@nsundareswaran `_ +- `@kelseymorris95 `_ diff --git a/HISTORY.rst b/HISTORY.rst index 4f32e95fa..0e72e0d0d 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -3,11 +3,8 @@ Release History --------------- -Upcoming -++++++++ - -New Release? -++++++++++++++++++ +2.0.0 (Upcoming) +++++++++++++++++ **Breaking Changes** @@ -40,7 +37,7 @@ New Release? ``BaseAPIJSONObject``, ``APIJSONObject``, was created to represent pseudo-smart objects such as ``Event`` that are not directly accessible through an API endpoint. -1.5.3 +1.5.3 (2016-05-26) ++++++++++++++++++ - Bugfix so that ``JWTAuth`` opens the PEM private key file in ``'rb'`` mode. diff --git a/boxsdk/exception.py b/boxsdk/exception.py index 8ae66735b..c3118f315 100644 --- a/boxsdk/exception.py +++ b/boxsdk/exception.py @@ -102,6 +102,7 @@ def __unicode__(self): def status(self): """ The status code of the network response that is responsible for the exception. + :rtype: `int` """ return self._status @@ -110,18 +111,25 @@ def status(self): def code(self): """ The explanation of the status code of the network response that is responsible for the exception. + :rtype: `int` """ return self._code @property def message(self): + """ + The message associated with the exception, e.g. 'message' field of the json in the failed response. + + :rtype: `unicode` + """ return self._message @property def request_id(self): """ The id the network request that is responsible for the exception. + :rtype: `unicode` """ return self._request_id @@ -130,6 +138,7 @@ def request_id(self): def url(self): """ The URL of the network request that is responsible for the exception. + :rtype: `unicode` """ return self._url @@ -138,6 +147,7 @@ def url(self): def method(self): """ The HTTP verb of the request that is responsible for the exception. + :rtype: `unicode` """ return self._method @@ -146,6 +156,7 @@ def method(self): def context_info(self): """ The context_info returned in the failed response. + :rtype: `dict` """ return self._context_info @@ -154,6 +165,7 @@ def context_info(self): def network_response(self): """ The response returned from the network. + :rtype: `NetworkResponse` """ return self._network_response diff --git a/boxsdk/network/default_network.py b/boxsdk/network/default_network.py index b103aadb6..110a8c188 100644 --- a/boxsdk/network/default_network.py +++ b/boxsdk/network/default_network.py @@ -76,6 +76,7 @@ def access_token_used(self): def request_response(self): """ The response returned from the Requests library. + :rtype: `Response` """ return self._request_response diff --git a/boxsdk/object/base_api_json_object.py b/boxsdk/object/base_api_json_object.py index 007fcc594..1fbf9eaab 100644 --- a/boxsdk/object/base_api_json_object.py +++ b/boxsdk/object/base_api_json_object.py @@ -67,6 +67,7 @@ def _description(self): def response_object(self): """ Return the JSON object representing the object returned from a Box API request. + :rtype: `dict` """ diff --git a/boxsdk/object/cloneable.py b/boxsdk/object/cloneable.py index b8eb841ff..d08fceb15 100644 --- a/boxsdk/object/cloneable.py +++ b/boxsdk/object/cloneable.py @@ -12,6 +12,7 @@ class Cloneable(object): def as_user(self, user): """ Returns a new endpoint object with default headers set up to make requests as the specified user. + :param user: The user to impersonate when making API requests. :type user: @@ -22,6 +23,7 @@ def as_user(self, user): def with_shared_link(self, shared_link, shared_link_password): """ Returns a new endpoint object with default headers set up to make requests using the shared link for auth. + :param shared_link: The shared link. :type shared_link: @@ -36,6 +38,7 @@ def with_shared_link(self, shared_link, shared_link_password): def clone(self, session=None): """ Returns a copy of this cloneable object using the specified session. + :param session: The Box session used to make requests. :type session: diff --git a/boxsdk/version.py b/boxsdk/version.py index e4cd37ccc..207cf8c03 100644 --- a/boxsdk/version.py +++ b/boxsdk/version.py @@ -3,4 +3,4 @@ from __future__ import unicode_literals, absolute_import -__version__ = '1.5.3' +__version__ = '2.0.0a1' diff --git a/docs/source/boxsdk.object.rst b/docs/source/boxsdk.object.rst index 94afd2192..6b337479c 100644 --- a/docs/source/boxsdk.object.rst +++ b/docs/source/boxsdk.object.rst @@ -4,6 +4,22 @@ boxsdk.object package Submodules ---------- +boxsdk.object.api_json_object module +------------------------------------ + +.. automodule:: boxsdk.object.api_json_object + :members: + :undoc-members: + :show-inheritance: + +boxsdk.object.base_api_json_object module +----------------------------------------- + +.. automodule:: boxsdk.object.base_api_json_object + :members: + :undoc-members: + :show-inheritance: + boxsdk.object.base_endpoint module ---------------------------------- @@ -20,6 +36,14 @@ boxsdk.object.base_object module :undoc-members: :show-inheritance: +boxsdk.object.cloneable module +------------------------------ + +.. automodule:: boxsdk.object.cloneable + :members: + :undoc-members: + :show-inheritance: + boxsdk.object.collaboration module ---------------------------------- @@ -28,6 +52,14 @@ boxsdk.object.collaboration module :undoc-members: :show-inheritance: +boxsdk.object.event module +-------------------------- + +.. automodule:: boxsdk.object.event + :members: + :undoc-members: + :show-inheritance: + boxsdk.object.events module --------------------------- diff --git a/docs/source/boxsdk.util.rst b/docs/source/boxsdk.util.rst index e06f0ffbe..e70628a8e 100644 --- a/docs/source/boxsdk.util.rst +++ b/docs/source/boxsdk.util.rst @@ -4,6 +4,14 @@ boxsdk.util package Submodules ---------- +boxsdk.util.api_call_decorator module +------------------------------------- + +.. automodule:: boxsdk.util.api_call_decorator + :members: + :undoc-members: + :show-inheritance: + boxsdk.util.compat module -------------------------