Skip to content

Commit 6b8146b

Browse files
authored
Automated Spec Update
c36ba27d8d56648555d3068bb3826e1d3a44d92b Co-authored-by: Bruce Zhang <brucez@dropbox.com>
1 parent e1bee85 commit 6b8146b

File tree

7 files changed

+249
-13
lines changed

7 files changed

+249
-13
lines changed

dropbox/base.py

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3065,7 +3065,8 @@ def files_tags_add(self,
30653065
scope: files.metadata.write
30663066
30673067
:param str path: Path to the item to be tagged.
3068-
:param str tag_text: The value of the tag to add.
3068+
:param str tag_text: The value of the tag to add. Will be automatically
3069+
converted to lowercase letters.
30693070
:rtype: None
30703071
:raises: :class:`.exceptions.ApiError`
30713072
@@ -3116,7 +3117,8 @@ def files_tags_remove(self,
31163117
scope: files.metadata.write
31173118
31183119
:param str path: Path to the item to tag.
3119-
:param str tag_text: The tag to remove.
3120+
:param str tag_text: The tag to remove. Will be automatically converted
3121+
to lowercase letters.
31203122
:rtype: None
31213123
:raises: :class:`.exceptions.ApiError`
31223124
@@ -3559,6 +3561,33 @@ def files_upload_session_start_batch(self,
35593561
)
35603562
return r
35613563

3564+
# ------------------------------------------
3565+
# Routes in openid namespace
3566+
3567+
def openid_userinfo(self):
3568+
"""
3569+
This route is used for refreshing the info that is found in the id_token
3570+
during the OIDC flow. This route doesn't require any arguments and will
3571+
use the scopes approved for the given access token.
3572+
3573+
Route attributes:
3574+
scope: openid
3575+
3576+
:rtype: :class:`dropbox.openid.UserInfoResult`
3577+
:raises: :class:`.exceptions.ApiError`
3578+
3579+
If this raises, ApiError will contain:
3580+
:class:`dropbox.openid.UserInfoError`
3581+
"""
3582+
arg = openid.UserInfoArgs()
3583+
r = self.request(
3584+
openid.userinfo,
3585+
'openid',
3586+
arg,
3587+
None,
3588+
)
3589+
return r
3590+
35623591
# ------------------------------------------
35633592
# Routes in paper namespace
35643593

dropbox/base_team.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,9 @@ def file_properties_templates_update_for_team(self,
205205
# ------------------------------------------
206206
# Routes in files namespace
207207

208+
# ------------------------------------------
209+
# Routes in openid namespace
210+
208211
# ------------------------------------------
209212
# Routes in paper namespace
210213

dropbox/files.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919
class AddTagArg(bb.Struct):
2020
"""
2121
:ivar files.AddTagArg.path: Path to the item to be tagged.
22-
:ivar files.AddTagArg.tag_text: The value of the tag to add.
22+
:ivar files.AddTagArg.tag_text: The value of the tag to add. Will be
23+
automatically converted to lowercase letters.
2324
"""
2425

2526
__slots__ = [
@@ -6858,7 +6859,8 @@ def _process_custom_annotations(self, annotation_type, field_path, processor):
68586859
class RemoveTagArg(bb.Struct):
68596860
"""
68606861
:ivar files.RemoveTagArg.path: Path to the item to tag.
6861-
:ivar files.RemoveTagArg.tag_text: The tag to remove.
6862+
:ivar files.RemoveTagArg.tag_text: The tag to remove. Will be automatically
6863+
converted to lowercase letters.
68626864
"""
68636865

68646866
__slots__ = [

dropbox/openid.py

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor):
7171
UserInfoArgs_validator = bv.Struct(UserInfoArgs)
7272

7373
class UserInfoError(bb.Struct):
74+
"""
75+
:ivar openid.UserInfoError.error_message: Brief explanation of the error.
76+
"""
7477

7578
__slots__ = [
7679
'_err_value',
@@ -101,6 +104,16 @@ def _process_custom_annotations(self, annotation_type, field_path, processor):
101104
UserInfoError_validator = bv.Struct(UserInfoError)
102105

103106
class UserInfoResult(bb.Struct):
107+
"""
108+
:ivar openid.UserInfoResult.family_name: Last name of user.
109+
:ivar openid.UserInfoResult.given_name: First name of user.
110+
:ivar openid.UserInfoResult.email: Email address of user.
111+
:ivar openid.UserInfoResult.email_verified: If user is email verified.
112+
:ivar openid.UserInfoResult.iss: Issuer of token (in this case Dropbox).
113+
:ivar openid.UserInfoResult.sub: An identifier for the user. This is the
114+
Dropbox account_id, a string value such as
115+
dbid:AAH4f99T0taONIb-OurWxbNQ6ywGRopQngc.
116+
"""
104117

105118
__slots__ = [
106119
'_family_name_value',
@@ -277,6 +290,19 @@ def _process_custom_annotations(self, annotation_type, field_path, processor):
277290
UserInfoError.error_message.default = ''
278291
UserInfoResult.iss.default = ''
279292
UserInfoResult.sub.default = ''
293+
userinfo = bb.Route(
294+
'userinfo',
295+
1,
296+
False,
297+
UserInfoArgs_validator,
298+
UserInfoResult_validator,
299+
UserInfoError_validator,
300+
{'auth': 'user',
301+
'host': 'api',
302+
'style': 'rpc'},
303+
)
304+
280305
ROUTES = {
306+
'userinfo': userinfo,
281307
}
282308

dropbox/sharing.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2264,8 +2264,11 @@ class FileMemberActionIndividualResult(bb.Union):
22642264
corresponding ``get_*`` method.
22652265
22662266
:ivar Optional[AccessLevel]
2267-
sharing.FileMemberActionIndividualResult.success: Member was
2268-
successfully removed from this file. If AccessLevel is given, the member
2267+
sharing.FileMemberActionIndividualResult.success: Part of the response
2268+
for both add_file_member and remove_file_member_v1 (deprecated). For
2269+
add_file_member, indicates giving access was successful and at what
2270+
AccessLevel. For remove_file_member_v1, indicates member was
2271+
successfully removed from the file. If AccessLevel is given, the member
22692272
still has access via a parent shared folder.
22702273
:ivar FileMemberActionError FileMemberActionIndividualResult.member_error:
22712274
User was not able to perform this action.
@@ -2313,7 +2316,10 @@ def is_member_error(self):
23132316

23142317
def get_success(self):
23152318
"""
2316-
Member was successfully removed from this file. If AccessLevel is given,
2319+
Part of the response for both add_file_member and remove_file_member_v1
2320+
(deprecated). For add_file_member, indicates giving access was
2321+
successful and at what AccessLevel. For remove_file_member_v1, indicates
2322+
member was successfully removed from the file. If AccessLevel is given,
23172323
the member still has access via a parent shared folder.
23182324
23192325
Only call this if :meth:`is_success` is true.

0 commit comments

Comments
 (0)