Module: Josef::GoogleWorkspace::Client
Instance Method Summary collapse
Methods included from Group
#create_group, #delete_group, #groups, #groups!
Methods included from Members
#add_member, #del_member, #member_mail_addreses, #members_by
Methods included from Config
#actor, #actor!, #credential_path, #domains, #token_path
Instance Method Details
#authorize! ⇒ Object
26 27 28 29 30 31 32 33 |
# File 'lib/josef/google_workspace/client.rb', line 26 def = Google::Auth::ServiceAccountCredentials.make_creds( json_key_io: File.open(credential_path), scope: SCOPE) .sub = actor end |
#client ⇒ Object
14 15 16 |
# File 'lib/josef/google_workspace/client.rb', line 14 def client @_client ||= client! end |
#client! ⇒ Object
18 19 20 21 22 23 24 |
# File 'lib/josef/google_workspace/client.rb', line 18 def client! service = Google::Apis::AdminDirectoryV1::DirectoryService.new service. = service..fetch_access_token! service end |