Last active
January 8, 2016 16:31
-
-
Save richieforeman/7a1b85ca896d2e38b556 to your computer and use it in GitHub Desktop.
Revisions
-
richieforeman revised this gist
Jan 8, 2016 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -12,7 +12,7 @@ # # Additionally, the Python library "execute" method allows for a "num_retries" param, # which is a baked in exponential backoff mechanism. service.users().makeAdmin(trace="token:<<tracing token goes here>>", userKey=username, body={ 'status': True -
richieforeman created this gist
Jul 9, 2014 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,19 @@ service = build(serviceName="admin", version="directory_v1", http=httplib2.Http()) # A tracing token can be attached by utilizing the 'trace' kwarg on a method call. # Switching the request to utilize all 'kwargs' is recommended. # # Importantly, when a request (such as the one below) includes a body parameter, # the tracing token should NOT be included in the body. # # The tracing token parameter will need to be added to EACH AND EVERY call where a tracing token is required. # # Additionally, the Python library "execute" method allows for a "num_retries" param, # which is a baked in exponential backoff mechanism. service.users().makeAdmin(trace="trace:<<tracing token goes here>>", userKey=username, body={ 'status': True }).execute(num_retries=5)