Class: PowerBiEmbedded::Base
- Inherits:
-
Object
- Object
- PowerBiEmbedded::Base
show all
- Defined in:
- lib/power_bi_embedded/base.rb
Class Method Summary
collapse
Class Method Details
.delete(endpoint, headers = nil) ⇒ Object
24
25
26
27
|
# File 'lib/power_bi_embedded/base.rb', line 24
def self.delete(endpoint, = nil)
response = HTTParty.delete(endpoint, headers: )
parse_response(response)
end
|
.get(endpoint, query = nil, headers = nil) ⇒ Object
9
10
11
12
|
# File 'lib/power_bi_embedded/base.rb', line 9
def self.get(endpoint, query = nil, = nil)
response = HTTParty.get(endpoint, headers: , query: query)
parse_response(response)
end
|
.parse_response(response) ⇒ Object
29
30
31
|
# File 'lib/power_bi_embedded/base.rb', line 29
def self.parse_response(response)
response.parsed_response.deep_symbolize_keys
end
|
.post(endpoint, body = nil, headers = nil) ⇒ Object
14
15
16
17
|
# File 'lib/power_bi_embedded/base.rb', line 14
def self.post(endpoint, body = nil, = nil)
response = HTTParty.post(endpoint, headers: , body: body)
parse_response(response)
end
|
.put(endpoint, body = nil, headers = nil) ⇒ Object
19
20
21
22
|
# File 'lib/power_bi_embedded/base.rb', line 19
def self.put(endpoint, body = nil, = nil)
response = HTTParty.put(endpoint, headers: , body: body)
parse_response(response)
end
|