Class: XIVAPI::Sheets
- Inherits:
-
Object
- Object
- XIVAPI::Sheets
- Defined in:
- lib/xivapi/sheets.rb
Instance Attribute Summary collapse
-
#client ⇒ Object
Returns the value of attribute client.
Instance Method Summary collapse
-
#all ⇒ Array<Hash>
List known excel sheets that can be read by the API.
-
#get(sheet, row_id, params = {}) ⇒ Hash
Read detailed, filterable information from a single sheet row and its related data.
-
#initialize(client) ⇒ XIVAPI::Sheets
constructor
Initialize a new Sheets client for making API requests.
-
#list(sheet, params = {}) ⇒ Array<Hash>
Read information about one or more rows and their related data.
Constructor Details
#initialize(client) ⇒ XIVAPI::Sheets
Initialize a new Sheets client for making API requests.
8 9 10 |
# File 'lib/xivapi/sheets.rb', line 8 def initialize(client) @client = client end |
Instance Attribute Details
#client ⇒ Object
Returns the value of attribute client.
3 4 5 |
# File 'lib/xivapi/sheets.rb', line 3 def client @client end |
Instance Method Details
#all ⇒ Array<Hash>
List known excel sheets that can be read by the API.
14 15 16 |
# File 'lib/xivapi/sheets.rb', line 14 def all client.request("sheet") end |
#get(sheet, row_id, params = {}) ⇒ Hash
Read detailed, filterable information from a single sheet row and its related data.
31 32 33 |
# File 'lib/xivapi/sheets.rb', line 31 def get(sheet, row_id, params = {}) client.request("sheet/#{sheet}/#{row_id}", params) end |
#list(sheet, params = {}) ⇒ Array<Hash>
Read information about one or more rows and their related data.
22 23 24 |
# File 'lib/xivapi/sheets.rb', line 22 def list(sheet, params = {}) client.request("sheet/#{sheet}", params) end |