Class: Avmtrf1::Tools::Msgraph::Api

Inherits:
EacRest::Api
  • Object
show all
Defined in:
lib/avmtrf1/tools/msgraph/api.rb,
lib/avmtrf1/tools/msgraph/api/root.rb,
lib/avmtrf1/tools/msgraph/api/team.rb,
lib/avmtrf1/tools/msgraph/api/member.rb

Defined Under Namespace

Classes: Member, Root, Team

Constant Summary collapse

API_ROOT_URL =
'https://graph.microsoft.com/v1.0'

Instance Method Summary collapse

Instance Method Details

#access_tokenString

Returns:

  • (String)


16
17
18
# File 'lib/avmtrf1/tools/msgraph/api.rb', line 16

def access_token
  token_info.fetch(:token).fetch(:accessToken)
end

#fs_object_idObject



26
27
28
# File 'lib/avmtrf1/tools/msgraph/api.rb', line 26

def fs_object_id
  client_id.to_s.variableize
end

#request(service_url_suffix, headers = {}, &body_data_proc) ⇒ EacRest::Request

Returns:

  • (EacRest::Request)


21
22
23
24
# File 'lib/avmtrf1/tools/msgraph/api.rb', line 21

def request(service_url_suffix, headers = {}, &body_data_proc)
  super(service_url_suffix, headers, &body_data_proc)
    .header('Authorization', "Bearer #{access_token}")
end