190 Commits

Author SHA1 Message Date
Ross Scroggs
ed48e5ecd9 Version (#297)
* Use string version rather than float; add check to gam version

This lets you have 3.72.0 or 3.72a; current scheme continues to work as
well.

Handle bad data in lastupdatecheck.txt

$ gam version check
GAM 3.72 - http://git.io/gam
Jay Lee <jay0lee@gmail.com>
Python 2.7.12 64-bit final
google-api-python-client 1.5.2
Darwin-15.6.0-x86_64-i386-64bit x86_64
Path: /Users/admin/Documents/GoogleApps/GAM
Version: Check, Current: 3.72, Latest: 3.71
$

Note that latest version at appspot is behind

* Don't allow check argument from showUsage
2016-10-22 11:52:00 -04:00
Ross Scroggs
34e55a492e Clan up App ID handling (#296)
Drop Google+ in name to id direction, transfers no longer supported
Keep Google+ in id to name direction for printing old transfers
Show real app name to user
Don't bail on unknown app ID from Google, keep going by using
'applicationId: ####' as name
2016-10-21 18:06:53 -04:00
Ross Scroggs
abf3d8fa1c Make set/show signature consistent. (#292)
* gam user foo signature should set signature on primary address for backwards compatability

gam user foo show signature already does this

* Simply signature/show signature, don't loop to get primary
2016-10-19 22:24:20 -04:00
Ross Scroggs
6143d00476 Align commands, delete debug prints (#291) 2016-10-16 11:07:36 -04:00
Ross Scroggs
a2fe11fd70 Use callGAPIitems to clean up code (#290) 2016-10-16 09:05:13 -04:00
Ross Scroggs
78ce646eee Add fullquery to show filelist (#289)
This allows user to bypass "'me' in owners"
2016-10-15 21:23:40 -04:00
Ross Scroggs
3115c578a0 Put send_email back for todrive, update OAUTH2_SCOPES (#288)
* Put send-email back for todrive, update scopes

* Use loop instead of list comprehension for selected_scopes

* Engage brain fully before commit
2016-10-15 20:37:28 -04:00
Jay Lee
5eb029baf1 Fix some pylint warnings/errors 2016-10-13 20:37:01 -04:00
Jay Lee
cf0af20d89 remove no-longer-used geturl() function 2016-10-13 20:09:22 -04:00
Jay Lee
dabb3362c8 formatting fixes 2016-10-13 15:09:35 -04:00
Jay Lee
8d2af5ca66 Kill GData until it's dead
Fixes #148. May need further cleanup
2016-10-13 14:52:25 -04:00
Ross Scroggs
c4dffd7584 Fix typos (#286) 2016-10-13 05:43:32 -04:00
Ross Scroggs
14c86e3780 Fix typo (#285) 2016-10-12 21:23:21 -04:00
Ross Scroggs
cc1126ff2f Eliminate unused body item (#283) 2016-10-12 18:44:30 -04:00
Ross Scroggs
6b0fb9e54d Handle misidentified codepoint (#281) 2016-10-12 18:02:26 -04:00
Jay Lee
8435d41d44 mention binary builds 2016-10-12 16:01:54 -04:00
Jay Lee
e92b9690d4 require Python 2.7 2016-10-12 16:01:54 -04:00
Jay Lee
953ea36177 Merge pull request #280 from PMox/master
Remove underscore or the string will not match
2016-10-12 15:27:49 -04:00
Paolo Mossino
36d0d7da7b Remove underscore or the string will not match 2016-10-12 21:18:51 +02:00
Jay Lee
3090c59582 GAM 3.72 2016-10-12 14:19:07 -04:00
Jay Lee
1de7e32f25 fix error message and remove old comment 2016-10-12 14:10:22 -04:00
Jay Lee
2bf058b089 make sure courseId isn't already prefixed before prefixing 2016-10-12 13:34:59 -04:00
Jay Lee
c507714ab6 CrOS device actions (disable, deprovision, reenable...) 2016-10-12 11:56:31 -04:00
Jay Lee
cdc72d2f23 catch additional errors on guardian delete 2016-10-12 11:53:37 -04:00
Ross Scroggs
f3f3f91fcb Fix spacing 2016-09-01 10:10:19 -07:00
Ross Scroggs
f8be56efdc Fix type, clean up doPrintGroupMembers 2016-09-01 10:07:26 -07:00
Jay Lee
dcae0155b2 Simply and generalize print group-members so that fields like the new status are automatically included as Google updates API 2016-08-31 14:23:58 -04:00
Ross Scroggs
44c0d4bf15 Add new fields to list of selectable fields in print groups 2016-08-30 19:05:51 -07:00
Ross Scroggs
b8b268f0ad default argument allowed for signature and sendas 2016-08-30 16:45:58 -07:00
Ross Scroggs
4182b3cd1e Print heading for info sendas 2016-08-30 12:08:37 -07:00
Ross Scroggs
24c0390174 Make routine to get sendas/signature attributes; allow treatasalias for gam signature 2016-08-30 11:52:27 -07:00
Ross Scroggs
2b65d87bfa Help for the Python challenged 2016-08-30 07:23:52 -07:00
Ross Scroggs
3bf2ecc6e3 Statement misplaced in doPrintCourseParticipants; correct documentation 2016-08-29 21:37:20 -07:00
Ross Scroggs
656f87f89c Allow charset <CharSet> with gam batch, like gam csv 2016-08-29 12:46:03 -07:00
Ross Scroggs
ae8949c6d6 Handle orphaned OrgUnit/Role Ids 2016-08-27 08:39:42 -07:00
Jay Lee
c7b44ae8d9 Merge pull request #255 from taers232c/branch-3.63
Update create datatransfer
2016-08-27 15:18:48 +00:00
Ross Scroggs
37726c493d Update create datatransfer
Allow drive as a synonym for Drive, avoids an API call
Update documentation
2016-08-27 05:50:59 -07:00
Jay Lee
83af5ee757 Merge pull request #250 from taers232c/branch-3.63
Clean up gam print guardians
2016-08-27 12:37:04 +00:00
Jay Lee
1539c37576 GAM 3.71 2016-08-25 12:16:43 -04:00
Ross Scroggs
34b9029e90 Clean up print guardians
Make gam show guardians and gam print guardians
show guardians gives formatted output
print guardians gives CSV output
This is like all other print/show xxx commands.
2016-08-21 22:41:01 -07:00
Ross Scroggs
7bf263fd35 Rewrite of doRequestOauth
This does not handle overwrite
2016-08-21 12:57:22 -07:00
Ross Scroggs
8254b1040c Pythonic way to initialize dictionary entry 2016-08-21 12:29:10 -07:00
Ross Scroggs
bbc9b8fb2b Clean up create/update user schema
Pass True/False to indicate update/create
Delete extraneous () with del, del is an operator, not a function
When looking for field to delete, don't distract user with messages
saying field name doesn't match other fields; you get a message only if
you give and invalid field name
Error messages to user on invalid arguments say create/update as
appropriate, before it always said create which might be confusing if
you just did an update
It's an error to say deletefield when creating
2016-08-21 11:46:42 -07:00
Ross Scroggs
3b5b5be881 Guardian command cleanup
Upshift states list as a convenience to user; split on comma or space
as in most other lists
Tell user about invalid argument
Keep pylint happy, eliminate extra spaces
2016-08-21 10:47:57 -07:00
Ross Scroggs
aa48edc0ff Improve CSV file reading 2016-08-21 09:54:27 -07:00
Jay Lee
219509853f upgrade to oauth2client 3.0. Override some strings in GAM
to reduce custom changes to oauth2client.
2016-08-20 16:25:49 -04:00
Jay Lee
f66aa71ec1 Schema updates no longer deletes fields. Fixes #229. 2016-08-19 15:58:56 -04:00
Jay Lee
e1e49f8edf fixes #238
-make sure name exists in body before setting givenName or familyName.
-change if else for updateCmd to avoid a double negative
2016-08-19 12:44:27 -04:00
Jay Lee
7a2785ba5c -Classroom Guardian API commands
-Allow pulling new activity reports w/o code changes
-GAM 3.7 baby!
2016-08-18 08:05:16 -04:00
Ross Scroggs
232755590d Write all thread messages to stderr 2016-08-12 09:50:44 -07:00