Skip to content

Commit 914f35d

Browse files
committed
Include Info column for all cached requests
If the user has provided a set of columns for a cached request, make sure it includes Info, and if it doesn't, add it.
1 parent 6e31048 commit 914f35d

File tree

4 files changed

+8
-3
lines changed

4 files changed

+8
-3
lines changed

Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: .
33
specs:
4-
xivapi (0.2.0)
4+
xivapi (0.2.1)
55
rest-client (~> 2.0.2)
66

77
GEM

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ A Ruby library for [XIVAPI](https://www.xivapi.com/).
77
Add this line to your application's Gemfile:
88

99
```ruby
10-
gem 'xivapi', git: 'https://github.com/xivapi/xivapi-ruby.git', tag: 'v0.2.0'
10+
gem 'xivapi', git: 'https://github.com/xivapi/xivapi-ruby.git', tag: 'v0.2.1'
1111
```
1212

1313
And then run:

lib/xivapi/http.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,11 @@ def request(client, endpoint, params = {}, payload = nil)
5151
# @param poll [true, false] Whether or not to poll XIVAPI until data is returned
5252
# @return the results of the request
5353
def request_cached(client, endpoint, key, params = {}, poll = false)
54+
columns = params[:columns]
55+
unless columns.empty? || columns.match?('Info')
56+
params[:columns] = columns.split(',').push('Info').join(',')
57+
end
58+
5459
response = request(client, endpoint, params)
5560

5661
case(response.info[key].state)

lib/xivapi/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
module XIVAPI
22
# Gem version
3-
VERSION = "0.2.0"
3+
VERSION = "0.2.1"
44
end

0 commit comments

Comments
 (0)