Skip to content

Commit 3cc181a

Browse files
committed
Update character data
* Adds missing MIMO and CJ data options to the `all_data` option. * Adds `extended` option for retrieving extended character data.
1 parent a3c373a commit 3cc181a

File tree

4 files changed

+9
-7
lines changed

4 files changed

+9
-7
lines changed

Gemfile.lock

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: .
33
specs:
4-
xivapi (0.3.1)
4+
xivapi (0.3.2)
55
rest-client (~> 2.0)
66

77
GEM
@@ -14,7 +14,7 @@ GEM
1414
domain_name (~> 0.5)
1515
mime-types (3.3.1)
1616
mime-types-data (~> 3.2015)
17-
mime-types-data (3.2019.1009)
17+
mime-types-data (3.2020.0512)
1818
netrc (0.11.0)
1919
rake (10.4.2)
2020
rest-client (2.1.0)
@@ -24,7 +24,7 @@ GEM
2424
netrc (~> 0.8)
2525
unf (0.1.4)
2626
unf_ext
27-
unf_ext (0.0.7.6)
27+
unf_ext (0.0.7.7)
2828
yard (0.9.19)
2929

3030
PLATFORMS

README.md

+1-1
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.3.1'
10+
gem 'xivapi', git: 'https://github.com/xivapi/xivapi-ruby.git', tag: 'v0.3.2'
1111
```
1212

1313
And then run:

lib/xivapi/request.rb

+4-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ module XIVAPI::Request
66
LODESTONE_LIMIT = 50.freeze
77

88
# Options used to retrieve all data when querying a character
9-
ALL_CHARACTER_DATA = 'AC,FR,FC,FCM,PVP'.freeze
9+
ALL_CHARACTER_DATA = 'AC,MIMO,CJ,FR,FC,FCM,PVP'.freeze
1010

1111
# @param indexes [String, Array <String>] One or more indexes to search on
1212
# @param string [String] Value to search for in the string column
@@ -63,11 +63,13 @@ def servers(group: false)
6363

6464
# @param id [Integer] Character ID
6565
# @param all_data [true, false] Return the full set of character data
66+
# @param extended [true, false] Return additional data for various fields (e.g. name, icon)
6667
# @param data [String, Array <String>] Additional data to request, see: https://xivapi.com/docs/Character#character
6768
# @param columns [String, Array <String>] One or more columns to limit results to
6869
# @return [OpenStruct] The requested character
69-
def character(id: nil, all_data: false, data: [], columns: [])
70+
def character(id: nil, all_data: false, extended: false, data: [], columns: [])
7071
params = { data: character_data(all_data, data), columns: [*columns].join(',') }
72+
params[:extended] = 1 if extended
7173
request(self, "character/#{id}", params)
7274
end
7375

lib/xivapi/version.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
module XIVAPI
22
# Gem version
3-
VERSION = "0.3.1"
3+
VERSION = "0.3.2"
44
end

0 commit comments

Comments
 (0)