Class: XIVAPI::Versions
- Inherits:
-
Object
- Object
- XIVAPI::Versions
- Defined in:
- lib/xivapi/versions.rb
Overview
Endpoints for querying metadata about the versions recorded by the boilmaster system.
Instance Attribute Summary collapse
-
#client ⇒ Object
Returns the value of attribute client.
Instance Method Summary collapse
-
#all ⇒ Array<Hash>
List versions understood by the API.
-
#initialize(client) ⇒ XIVAPI::Versions
constructor
Initialize a new Versions client for making API requests.
Constructor Details
#initialize(client) ⇒ XIVAPI::Versions
Initialize a new Versions client for making API requests.
9 10 11 |
# File 'lib/xivapi/versions.rb', line 9 def initialize(client) @client = client end |
Instance Attribute Details
#client ⇒ Object
Returns the value of attribute client.
4 5 6 |
# File 'lib/xivapi/versions.rb', line 4 def client @client end |
Instance Method Details
#all ⇒ Array<Hash>
List versions understood by the API.
15 16 17 18 |
# File 'lib/xivapi/versions.rb', line 15 def all result = client.request("version") result["versions"].flat_map { |v| v["names"] } end |