Class: LeanMicrosoftGraph::Resource

Inherits:
Object
  • Object
show all
Defined in:
lib/lean_microsoft_graph/resource.rb

Instance Method Summary collapse

Constructor Details

#initialize(connection) ⇒ Resource

Returns a new instance of Resource.



5
6
7
# File 'lib/lean_microsoft_graph/resource.rb', line 5

def initialize(connection)
  @connection = connection
end

Instance Method Details

#get_request(url, params = {}, headers = {}, &block) ⇒ Object



9
10
11
# File 'lib/lean_microsoft_graph/resource.rb', line 9

def get_request(url, params = {}, headers = {}, &block)
  handle_response(@connection.get(url, params, headers, &block))
end

#post_request(url, body = {}, headers = {}, &block) ⇒ Object



13
14
15
# File 'lib/lean_microsoft_graph/resource.rb', line 13

def post_request(url, body = {}, headers = {}, &block)
  handle_response(@connection.post(url, body, headers, &block))
end