diff --git a/src/email-audit-v1.json b/src/email-audit-v1.json new file mode 100644 index 00000000..b617e1f5 --- /dev/null +++ b/src/email-audit-v1.json @@ -0,0 +1,34 @@ +{ + "kind": "discovery#restDescription", + "discoveryVersion": "v1", + "id": "email-audit:v1", + "name": "email-audit", + "version": "v1", + "revision": "20130823", + "title": "Email Audit API", + "description": "Lets you peform Google Apps Email Audits", + "ownerDomain": "google.com", + "ownerName": "Google", + "icons": { + "x16": "http://www.google.com/images/icons/product/search-16.gif", + "x32": "http://www.google.com/images/icons/product/search-32.gif" + }, + "documentationLink": "https://developers.google.com/admin-sdk/email-audit", + "protocol": "rest", + "baseUrl": "https://apps-apis.google.com/", + "rootUrl": "https://apps-apis.google.com/", + "servicePath": "/a/feeds/compliance/audit/", + "auth": { + "oauth2": { + "scopes": { + "https://apps-apis.google.com/a/feeds/compliance/audit/": { + "description": "Manage email audits" + } + } + } + }, + "schemas": { + }, + "resources": { + } +} diff --git a/src/email-settings-v1.json b/src/email-settings-v1.json new file mode 100644 index 00000000..d2ab10be --- /dev/null +++ b/src/email-settings-v1.json @@ -0,0 +1,34 @@ +{ + "kind": "discovery#restDescription", + "discoveryVersion": "v1", + "id": "email-settings:v1", + "name": "email-settings", + "version": "v1", + "revision": "20130823", + "title": "Email Settings API", + "description": "Lets you manage Google Apps Email Settings", + "ownerDomain": "google.com", + "ownerName": "Google", + "icons": { + "x16": "http://www.google.com/images/icons/product/search-16.gif", + "x32": "http://www.google.com/images/icons/product/search-32.gif" + }, + "documentationLink": "https://developers.google.com/admin-sdk/email-settings", + "protocol": "rest", + "baseUrl": "https://apps-apis.google.com/", + "rootUrl": "https://apps-apis.google.com/", + "servicePath": "/a/feeds/emailsettings/2.0/", + "auth": { + "oauth2": { + "scopes": { + "https://apps-apis.google.com/a/feeds/emailsettings/2.0/": { + "description": "Manage email audits" + } + } + } + }, + "schemas": { + }, + "resources": { + } +} diff --git a/src/gam.py b/src/gam.py index ab3d468b..8a19a4e4 100755 --- a/src/gam.py +++ b/src/gam.py @@ -8707,23 +8707,6 @@ def getUsersToModify(entity_type=None, entity=None, silent=False, return_uids=Fa return full_users def OAuthInfo(): -<<<<<<< HEAD - access_token = sys.argv[3] - oa2 = buildGAPIObject(u'oauth2') - token_info = callGAPI(oa2, u'tokeninfo', access_token=access_token) - print u"Client ID: %s" % token_info[u'issued_to'] - try: - print u"Secret: %s" % credentials.client_secret - except UnboundLocalError: - pass - print u'Scopes:' - for scope in token_info[u'scope'].split(u' '): - print u' %s' % scope - try: - print u'Google Apps Admin: %s' % token_info[u'email'] - except KeyError: - print u'Google Apps Admin: Unknown' -======= # TODO eventually would be good if this did something to test admin-selected scopes pass @@ -8732,7 +8715,6 @@ UBER_SCOPES = { u'drive-v2': [u'https://www.googleapis.com/auth/drive'], u'appsactivity-v1': [u'https://www.googleapis.com/auth/activity'] } ->>>>>>> jay0lee/master def select_default_scopes(all_apis): for api_name, api in all_apis.items(): @@ -8764,6 +8746,7 @@ def select_default_scopes(all_apis): def doRequestOAuth(): admin_email = raw_input(u'Please enter your admin email address: ') apis = API_VER_MAPPING.keys() + apis.remove(u'oauth2') all_apis = {} for api in apis: version = getAPIVer(api) diff --git a/src/gam.spec b/src/gam.spec index 57abac1f..83620ea1 100644 --- a/src/gam.spec +++ b/src/gam.spec @@ -11,6 +11,8 @@ for d in a.datas: a.datas += [('httplib2/cacerts.txt', 'httplib2\cacerts.txt', 'DATA')] a.datas += [('cloudprint-v2.json', 'cloudprint-v2.json', 'DATA')] a.datas += [('admin-settings-v1.json', 'admin-settings-v1.json', 'DATA')] +a.datas += [('email-settings-v1.json', 'email-settings-v1.json', 'DATA')] +a.datas += [('email-audit-v1.json', 'email-audit-v1.json', 'DATA')] pyz = PYZ(a.pure) exe = EXE(pyz, a.scripts,