Class: Warcraft::ApiResponse
- Inherits:
-
Object
- Object
- Warcraft::ApiResponse
show all
- Extended by:
- Forwardable
- Defined in:
- lib/warcraft/api_response.rb
Class Method Summary
collapse
Instance Method Summary
collapse
Constructor Details
#initialize(client, response) ⇒ ApiResponse
Returns a new instance of ApiResponse.
12
13
14
15
16
|
# File 'lib/warcraft/api_response.rb', line 12
def initialize(client, response)
@client = client
@response = response
@memoized_responses = {}
end
|
Class Method Details
.convert_time(timestamp) ⇒ Time
24
25
26
|
# File 'lib/warcraft/api_response.rb', line 24
def self.convert_time(timestamp)
Time.at(timestamp / 1000)
end
|
Instance Method Details
#url ⇒ String
19
20
21
|
# File 'lib/warcraft/api_response.rb', line 19
def url
@response.dig(:_links, :self, :href)
end
|