@@ -61,51 +61,14 @@ def servers(group: false)
61
61
request ( self , endpoint )
62
62
end
63
63
64
- # @param ids [Integer, Array<Integer>] ID(s) of the item(s) to look up
65
- # @param servers [String, Array<String>] Server(s) to retrieve the market for
66
- # @param data_center [String] Data center to retrieve the market for
67
- # @param max_history [Integer] The maximum amount of history to retrieve
68
- # @param columns [String, Array <String>] One or more columns to limit results to
69
- # @return [OpenStruct] Market price results
70
- def market ( ids : [ ] , servers : [ ] , data_center : nil , max_history : nil , columns : [ ] )
71
- ids , server_names = [ *ids ] , [ *servers ]
72
- params = { max_history : max_history , columns : [ *columns ] . join ( ',' ) }
73
-
74
- if ids . size > 1
75
- params . merge! ( ids : ids . join ( ',' ) , dc : data_center , servers : server_names . join ( ',' ) )
76
- request ( self , 'market/items' , params )
77
- elsif data_center || server_names . size > 1 || server_names [ 0 ] . match? ( ',' )
78
- params . merge! ( dc : data_center , servers : server_names . join ( ',' ) )
79
- request ( self , "market/item/#{ ids . first } " , params )
80
- else
81
- request ( self , "market/#{ server_names . first } /item/#{ ids . first } " , params )
82
- end
83
- end
84
-
85
- # @return [Array<OpenStruct>] List of Market categories
86
- def market_categories
87
- request ( self , 'market/categories' )
88
- end
89
-
90
64
# @param id [Integer] Character ID
91
65
# @param all_data [true, false] Return the full set of character data
92
- # @param poll [true, false] Continuously call the API until a result is cached and returned
93
66
# @param data [String, Array <String>] Additional data to request, see: https://xivapi.com/docs/Character#character
94
67
# @param columns [String, Array <String>] One or more columns to limit results to
95
68
# @return [OpenStruct] The requested character
96
- def character ( id : nil , all_data : false , poll : false , data : [ ] , columns : [ ] )
69
+ def character ( id : nil , all_data : false , data : [ ] , columns : [ ] )
97
70
params = { data : character_data ( all_data , data ) , columns : [ *columns ] . join ( ',' ) }
98
- request_cached ( self , "character/#{ id } " , :character , params , poll )
99
- end
100
-
101
- # @param ids [String, Array<Integer>] Character IDs
102
- # @param all_data [true, false] Return the full set of character data
103
- # @param data [String, Array <String>] Additional data to request, see: https://xivapi.com/docs/Character#character
104
- # @param columns [String, Array <String>] One or more columns to limit results to
105
- # @return [Array<OpenStruct>] The requested characters
106
- def characters ( ids : nil , all_data : false , data : [ ] , columns : [ ] )
107
- body = { ids : [ *ids ] . join ( ',' ) , data : character_data ( all_data , data ) , columns : [ *columns ] . join ( ',' ) }
108
- request ( self , 'characters' , { } , body )
71
+ request ( self , "character/#{ id } " , params )
109
72
end
110
73
111
74
# @param name [String] Character name
@@ -117,27 +80,20 @@ def character_search(name: nil, server: nil, columns: [])
117
80
XIVAPI ::Paginator . new ( self , params , 'character/search' , LODESTONE_LIMIT )
118
81
end
119
82
120
- # @param id [Integer] Character ID
121
- # @return [true, false] Whether or not the character update was requested successfully
122
- def character_update ( id : nil )
123
- request ( self , "character/#{ id } /update" ) == 1
124
- end
125
-
126
83
# @param id [Integer] Character ID
127
84
# @param token [String] Verification token to check for
128
85
# @return [true, false] Whether or not the character is verified
129
86
def character_verified? ( id : nil , token : nil )
130
- request ( self , "character/ #{ id } /verification" , { token : token } ) . pass
87
+ character ( id : id , columns : 'Character.Bio' ) . character . bio . match? ( token )
131
88
end
132
89
133
90
# @param id [Integer] Free company ID
134
91
# @param members [true, false] Return member data
135
- # @param poll [true, false] Continuously call the API until a result is cached and returned
136
92
# @param columns [String, Array <String>] One or more columns to limit results to
137
93
# @return [OpenStruct] The requested free company
138
- def free_company ( id : nil , members : false , poll : false , columns : [ ] )
94
+ def free_company ( id : nil , members : false , columns : [ ] )
139
95
params = { data : members ? 'FCM' : nil , columns : [ *columns ] . join ( ',' ) }
140
- request_cached ( self , "freecompany/#{ id } " , :free_company , params , poll )
96
+ request ( self , "freecompany/#{ id } " , params )
141
97
end
142
98
143
99
# @param name [String] Free company name
@@ -150,12 +106,11 @@ def free_company_search(name: nil, server: nil, columns: [])
150
106
end
151
107
152
108
# @param id [Integer] Linkshell ID
153
- # @param poll [true, false] Continuously call the API until a result is cached and returned
154
109
# @param columns [String, Array <String>] One or more columns to limit results to
155
110
# @return [OpenStruct] The requested linkshell
156
- def linkshell ( id : nil , poll : false , columns : [ ] )
111
+ def linkshell ( id : nil , columns : [ ] )
157
112
params = { columns : [ *columns ] . join ( ',' ) }
158
- request_cached ( self , "linkshell/#{ id } " , :linkshell , params , poll )
113
+ request ( self , "linkshell/#{ id } " , params )
159
114
end
160
115
161
116
# @param name [String] Linkshell name
@@ -168,12 +123,11 @@ def linkshell_search(name: nil, server: nil, columns: [])
168
123
end
169
124
170
125
# @param id [Integer] PVP team ID
171
- # @param poll [true, false] Continuously call the API until a result is cached and returned
172
126
# @param columns [String, Array <String>] One or more columns to limit results to
173
127
# @return [OpenStruct] The requested PVP team
174
- def pvp_team ( id : nil , poll : false , columns : [ ] )
128
+ def pvp_team ( id : nil , columns : [ ] )
175
129
params = { columns : [ *columns ] . join ( ',' ) }
176
- request_cached ( self , "pvpteam/#{ id } " , :pvp_team , params , poll )
130
+ request ( self , "pvpteam/#{ id } " , params )
177
131
end
178
132
179
133
# @param name [String] PVP team name
0 commit comments