Class: LeanMicrosoftGraph::Resource
- Inherits:
-
Object
- Object
- LeanMicrosoftGraph::Resource
- Defined in:
- lib/lean_microsoft_graph/resource.rb
Direct Known Subclasses
LeanMicrosoftGraph::Resources::TokenResource, LeanMicrosoftGraph::Resources::UsersResource
Instance Method Summary collapse
- #get_request(url, params = {}, headers = {}, &block) ⇒ Object
-
#initialize(connection) ⇒ Resource
constructor
A new instance of Resource.
- #post_request(url, body = {}, headers = {}, &block) ⇒ Object
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 |