Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 38 additions & 36 deletions dropbox/account.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@

class AccountPhotoGetArg(bb.Struct):
"""
:ivar account.AccountPhotoGetArg.dbx_account_id: Encoded ID of the user.
Must start either with 'dbid:' or 'dbaphid:'.
:ivar account.AccountPhotoGetArg.size: A string representing the size of the
photo.
:ivar account.AccountPhotoGetArg.circle_crop: True if the photo should be
cropped and false otherwise.
:ivar account.AccountPhotoGetArg.expect_account_photo: True if we expect
account photo to exist.
:ivar AccountPhotoGetArg.dbx_account_id:
Encoded ID of the user. Must start either with 'dbid:' or 'dbaphid:'.
:ivar AccountPhotoGetArg.size:
A string representing the size of the photo.
:ivar AccountPhotoGetArg.circle_crop:
True if the photo should be cropped and false otherwise.
:ivar AccountPhotoGetArg.expect_account_photo:
True if we expect account photo to exist.
"""

__slots__ = [
Expand Down Expand Up @@ -69,12 +69,13 @@ class AccountPhotoGetError(bb.Union):
return true. To get the associated value of a tag (if one exists), use the
corresponding ``get_*`` method.

:ivar ThumbnailError AccountPhotoGetError.thumbnail_error: Indicates
infrastructural failure.
:ivar account.AccountPhotoGetError.account_photo_missing: Account photo is
missing (but we did not expect it to exist).
:ivar account.AccountPhotoGetError.expected_account_photo_missing: Account
photo was expected to exist, but it's missing.
:ivar AccountPhotoGetError.thumbnail_error:
Indicates infrastructural failure.
:vartype AccountPhotoGetError.thumbnail_error: ThumbnailError
:ivar AccountPhotoGetError.account_photo_missing:
Account photo is missing (but we did not expect it to exist).
:ivar AccountPhotoGetError.expected_account_photo_missing:
Account photo was expected to exist, but it's missing.
"""

_catch_all = 'other'
Expand Down Expand Up @@ -147,8 +148,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor):

class AccountPhotoGetResult(bb.Struct):
"""
:ivar account.AccountPhotoGetResult.content_type: The data returned by
get_photo.
:ivar AccountPhotoGetResult.content_type:
The data returned by get_photo.
"""

__slots__ = [
Expand Down Expand Up @@ -242,8 +243,9 @@ class PhotoSourceArg(bb.Union):
return true. To get the associated value of a tag (if one exists), use the
corresponding ``get_*`` method.

:ivar str account.PhotoSourceArg.base64_data: Image data in base64-encoded
bytes.
:ivar PhotoSourceArg.base64_data:
Image data in base64-encoded bytes.
:vartype PhotoSourceArg.base64_data: str
"""

_catch_all = 'other'
Expand Down Expand Up @@ -296,8 +298,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor):

class SetProfilePhotoArg(bb.Struct):
"""
:ivar account.SetProfilePhotoArg.photo: Image to set as the user's new
profile photo.
:ivar SetProfilePhotoArg.photo:
Image to set as the user's new profile photo.
"""

__slots__ = [
Expand Down Expand Up @@ -326,16 +328,16 @@ class SetProfilePhotoError(bb.Union):
return true. To get the associated value of a tag (if one exists), use the
corresponding ``get_*`` method.

:ivar account.SetProfilePhotoError.file_type_error: File cannot be set as
profile photo.
:ivar account.SetProfilePhotoError.file_size_error: File cannot exceed 10
MB.
:ivar account.SetProfilePhotoError.dimension_error: Image must be larger
than 128 x 128.
:ivar account.SetProfilePhotoError.thumbnail_error: Image could not be
thumbnailed.
:ivar account.SetProfilePhotoError.transient_error: Temporary infrastructure
failure, please retry.
:ivar SetProfilePhotoError.file_type_error:
File cannot be set as profile photo.
:ivar SetProfilePhotoError.file_size_error:
File cannot exceed 10 MB.
:ivar SetProfilePhotoError.dimension_error:
Image must be larger than 128 x 128.
:ivar SetProfilePhotoError.thumbnail_error:
Image could not be thumbnailed.
:ivar SetProfilePhotoError.transient_error:
Temporary infrastructure failure, please retry.
"""

_catch_all = 'other'
Expand Down Expand Up @@ -407,8 +409,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor):

class SetProfilePhotoResult(bb.Struct):
"""
:ivar account.SetProfilePhotoResult.profile_photo_url: URL for the photo
representing the user, if one is set.
:ivar SetProfilePhotoResult.profile_photo_url:
URL for the photo representing the user, if one is set.
"""

__slots__ = [
Expand Down Expand Up @@ -437,10 +439,10 @@ class ThumbnailError(bb.Union):
return true. To get the associated value of a tag (if one exists), use the
corresponding ``get_*`` method.

:ivar account.ThumbnailError.permanent_failure: Indicates permanent
infrastructural failure.
:ivar account.ThumbnailError.temporary_failure: Indicates temporary
infrastructural failure.
:ivar ThumbnailError.permanent_failure:
Indicates permanent infrastructural failure.
:ivar ThumbnailError.temporary_failure:
Indicates temporary infrastructural failure.
"""

_catch_all = 'other'
Expand Down
34 changes: 19 additions & 15 deletions dropbox/async_.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@ class LaunchResultBase(bb.Union):
return true. To get the associated value of a tag (if one exists), use the
corresponding ``get_*`` method.

:ivar str async.LaunchResultBase.async_job_id: This response indicates that
the processing is asynchronous. The string is an id that can be used to
obtain the status of the asynchronous job.
:ivar LaunchResultBase.async_job_id:
This response indicates that the processing is asynchronous. The string
is an id that can be used to obtain the status of the asynchronous job.
:vartype LaunchResultBase.async_job_id: str
"""

_catch_all = None
Expand Down Expand Up @@ -73,8 +74,8 @@ class LaunchEmptyResult(LaunchResultBase):
return true. To get the associated value of a tag (if one exists), use the
corresponding ``get_*`` method.

:ivar async.LaunchEmptyResult.complete: The job finished synchronously and
successfully.
:ivar LaunchEmptyResult.complete:
The job finished synchronously and successfully.
"""

# Attribute is overwritten below the class definition
Expand All @@ -97,8 +98,9 @@ class PollArg(bb.Struct):
"""
Arguments for methods that poll the status of an asynchronous job.

:ivar async.PollArg.async_job_id: Id of the asynchronous job. This is the
value of a response returned from the method that launched the job.
:ivar PollArg.async_job_id:
Id of the asynchronous job. This is the value of a response returned
from the method that launched the job.
"""

__slots__ = [
Expand Down Expand Up @@ -132,8 +134,8 @@ class PollResultBase(bb.Union):
return true. To get the associated value of a tag (if one exists), use the
corresponding ``get_*`` method.

:ivar async.PollResultBase.in_progress: The asynchronous job is still in
progress.
:ivar PollResultBase.in_progress:
The asynchronous job is still in progress.
"""

_catch_all = None
Expand Down Expand Up @@ -162,8 +164,8 @@ class PollEmptyResult(PollResultBase):
return true. To get the associated value of a tag (if one exists), use the
corresponding ``get_*`` method.

:ivar async.PollEmptyResult.complete: The asynchronous job has completed
successfully.
:ivar PollEmptyResult.complete:
The asynchronous job has completed successfully.
"""

# Attribute is overwritten below the class definition
Expand All @@ -190,10 +192,12 @@ class PollError(bb.Union):
return true. To get the associated value of a tag (if one exists), use the
corresponding ``get_*`` method.

:ivar async.PollError.invalid_async_job_id: The job ID is invalid.
:ivar async.PollError.internal_error: Something went wrong with the job on
Dropbox's end. You'll need to verify that the action you were taking
succeeded, and if not, try again. This should happen very rarely.
:ivar PollError.invalid_async_job_id:
The job ID is invalid.
:ivar PollError.internal_error:
Something went wrong with the job on Dropbox's end. You'll need to
verify that the action you were taking succeeded, and if not, try again.
This should happen very rarely.
"""

_catch_all = 'other'
Expand Down
Loading
Loading