riot_lol_api 0.0.4 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/README.md +166 -11
- data/lib/riot_lol_api/client.rb +220 -20
- data/lib/riot_lol_api/model/aggregated_stat.rb +14 -0
- data/lib/riot_lol_api/model/altimage.rb +14 -0
- data/lib/riot_lol_api/model/entry.rb +14 -0
- data/lib/riot_lol_api/model/gold.rb +14 -0
- data/lib/riot_lol_api/model/image.rb +22 -12
- data/lib/riot_lol_api/model/item.rb +3 -0
- data/lib/riot_lol_api/model/league.rb +16 -0
- data/lib/riot_lol_api/model/map.rb +18 -0
- data/lib/riot_lol_api/model/mastery.rb +16 -2
- data/lib/riot_lol_api/model/page.rb +1 -0
- data/lib/riot_lol_api/model/player_stat_rank.rb +16 -0
- data/lib/riot_lol_api/model/player_stat_summary.rb +16 -0
- data/lib/riot_lol_api/model/rune.rb +14 -0
- data/lib/riot_lol_api/model/spell.rb +1 -0
- data/lib/riot_lol_api/model/summoner.rb +58 -3
- data/lib/riot_lol_api/model.rb +0 -2
- data/lib/riot_lol_api/version.rb +1 -1
- data/lib/riot_lol_api.rb +1 -1
- data/riot_lol_api.gemspec +9 -1
- data/spec/mock_response/get_all_champions_by_ids.json +13 -0
- data/spec/mock_response/get_all_champions_by_ids_all_data.json +13 -0
- data/spec/mock_response/get_all_item.json +13 -0
- data/spec/mock_response/get_all_masteries.json +13 -0
- data/spec/mock_response/get_all_runes.json +13 -0
- data/spec/mock_response/get_all_summoner_spells.json +13 -0
- data/spec/mock_response/get_all_summoner_spells_by_ids.json +13 -0
- data/spec/mock_response/get_item_by_id.json +13 -0
- data/spec/mock_response/get_mastery_by_id.json +13 -0
- data/spec/mock_response/get_player_league.json +11 -0
- data/spec/mock_response/get_player_stat_ranked.json +12 -0
- data/spec/mock_response/get_player_stat_summaries.json +13 -0
- data/spec/mock_response/get_realm.json +13 -0
- data/spec/mock_response/get_rune_by_id.json +13 -0
- data/spec/mock_response/get_summoner_spell_by_id.json +13 -0
- data/spec/mock_response/get_version.json +13 -0
- data/spec/riot_lol_api_spec.rb +313 -8
- metadata +43 -6
- data/.DS_Store +0 -0
- data/lib/.DS_Store +0 -0
- data/spec/.DS_Store +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 97acb1526afe0a5c58b273e0001f83e5818f625a
|
4
|
+
data.tar.gz: ce093f7638e7986b430e389eddc1cf02bc169dfd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 46d383514004bfa91e94ad71e37186cbc15131450d55485f5896a7232a6342cc4556cbd05c23afe8a52da979091bd1d13f77f91ea9f1e079856e8def6b1281ad
|
7
|
+
data.tar.gz: 5911f772bf743b5597617b2b077654e022691b3ea18426cedd913a6ae523d188bf5954c6a29562c5c0fb8340abd7bff551ca31f70b9f7e6cc24ac2ef60d37586
|
data/.gitignore
CHANGED
data/README.md
CHANGED
@@ -1,30 +1,185 @@
|
|
1
1
|
[![Gem Version](https://badge.fury.io/rb/riot_lol_api.svg)](http://badge.fury.io/rb/riot_lol_api)
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
3
|
+
```
|
4
|
+
__________.__ __ _____ __________.___
|
5
|
+
\______ \__| _____/ |_ _________ _____ ____ / _ \\______ \ |
|
6
|
+
| _/ |/ _ \ __\ / ___\__ \ / \_/ __ \ / /_\ \| ___/ |
|
7
|
+
| | \ ( <_> ) | / /_/ > __ \| Y Y \ ___/ / | \ | | |
|
8
|
+
|____|_ /__|\____/|__| \___ (____ /__|_| /\___ > \____|__ /____| |___|
|
9
|
+
\/ /_____/ \/ \/ \/ \/
|
10
|
+
```
|
6
11
|
|
7
12
|
## Status
|
8
13
|
|
9
|
-
|
14
|
+
###V 0.1.0
|
15
|
+
|
16
|
+
```
|
17
|
+
- champion-v1.2 ... NO IMPLEMENT
|
18
|
+
- game-v1.3 ... OK
|
19
|
+
- league-v2.4 ...
|
20
|
+
/by-summoner/{summonerIds}/entry ... OK
|
21
|
+
- lol-static-data-v1.2 ... OK
|
22
|
+
- stats-v1.3 ... OK
|
23
|
+
- summoner-v1.4 ... OK
|
24
|
+
/{summonerIds}/name ... NO IMPLEMENT
|
25
|
+
- team-v2.3 ... NO IMPLEMENT
|
26
|
+
```
|
10
27
|
|
11
28
|
## Installation
|
12
29
|
|
13
30
|
Add this line to your application's Gemfile:
|
14
|
-
|
15
|
-
|
31
|
+
```ruby
|
32
|
+
gem 'riot_lol_api'
|
33
|
+
```
|
16
34
|
|
17
35
|
And then execute:
|
18
|
-
|
19
|
-
|
36
|
+
```shell
|
37
|
+
bundle
|
38
|
+
```
|
20
39
|
|
21
40
|
Or install it yourself as:
|
22
|
-
|
23
|
-
|
41
|
+
```shell
|
42
|
+
gem install riot_lol_api
|
43
|
+
```
|
24
44
|
|
25
45
|
## Usage
|
46
|
+
###1) Token
|
47
|
+
Get token api on [http://developer.riotgames.com/](http://developer.riotgames.com/)
|
48
|
+
|
49
|
+
###2) Scripts
|
50
|
+
Sample scripts
|
51
|
+
```ruby
|
52
|
+
# Set token
|
53
|
+
RiotLolApi::TOKEN = XXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
54
|
+
|
55
|
+
# Create client
|
56
|
+
client = RiotLolApi::Client.new(:region => 'your_region')
|
57
|
+
|
58
|
+
# Start get data
|
59
|
+
summoner = client.get_summoner_by_name 'your_summoner_name'
|
60
|
+
|
61
|
+
```
|
62
|
+
|
63
|
+
Methods
|
64
|
+
```ruby
|
65
|
+
# CLIENT
|
66
|
+
|
67
|
+
# Create client object
|
68
|
+
client = RiotLolApi::Client.new(:region => 'your_region')
|
69
|
+
|
70
|
+
# SUMMONER
|
71
|
+
|
72
|
+
# Get summoner by name
|
73
|
+
# params : name => string
|
74
|
+
client.get_summoner_by_name 'pacoloco'
|
75
|
+
|
76
|
+
# Get summoner by id
|
77
|
+
# params : id => integer
|
78
|
+
client.get_summoner_by_id 20639710
|
79
|
+
|
80
|
+
# CHAMPION
|
81
|
+
|
82
|
+
# Get champion by id
|
83
|
+
# params :
|
84
|
+
# id => integer,
|
85
|
+
# data => hash (version, champData) - default => nill,
|
86
|
+
# locale => string ('fr_FR','en_EN', ...) - default => 'fr_FR'
|
87
|
+
client.get_champion_by_id id_champ, data = {:version => num_version, :champData => 'all'}, locale = 'fr_FR'
|
88
|
+
|
89
|
+
# Get all champions
|
90
|
+
# params :
|
91
|
+
# data => hash (version, champData) - default => nill,
|
92
|
+
# sort_id => boolean - default => false
|
93
|
+
# locale => string ('fr_FR','en_EN', ...) - default => 'fr_FR'
|
94
|
+
client.get_all_champions data = {:version => num_version, :champData => 'all'}, sort_id = 'false', locale = 'fr_FR'
|
95
|
+
|
96
|
+
# ITEM
|
97
|
+
|
98
|
+
# Get item by id
|
99
|
+
# params :
|
100
|
+
# id => integer,
|
101
|
+
# data => hash (version, itemListData) - default => nill,
|
102
|
+
# locale => string ('fr_FR','en_EN', ...) - default => 'fr_FR'
|
103
|
+
client.get_item_by_id id, data = {:version => num_version, :itemListData => 'all'}, locale = 'fr_FR'
|
104
|
+
|
105
|
+
# Get all items
|
106
|
+
# params :
|
107
|
+
# data => hash (version, itemListData) - default => nill,
|
108
|
+
# locale => string ('fr_FR','en_EN', ...) - default => 'fr_FR'
|
109
|
+
client.get_all_items data = {:version => num_version, :itemListData => 'all'}, locale = 'fr_FR'
|
110
|
+
|
111
|
+
# MASTERY
|
112
|
+
|
113
|
+
# Get masteries by id
|
114
|
+
# params :
|
115
|
+
# id => integer,
|
116
|
+
# data => hash (version, masteryListData) - default => nill,
|
117
|
+
# locale => string ('fr_FR','en_EN', ...) - default => 'fr_FR'
|
118
|
+
client.get_mastery_by_id id, data = {:version => num_version, :masteryListData => 'all'}, locale = 'fr_FR'
|
119
|
+
|
120
|
+
# Get all masteries
|
121
|
+
# params :
|
122
|
+
# data => hash (version, masteryListData) - default => nill,
|
123
|
+
# locale => string ('fr_FR','en_EN', ...) - default => 'fr_FR'
|
124
|
+
client.get_all_masteries data = {:version => num_version, :masteryListData => 'all'}, locale = 'fr_FR'
|
125
|
+
|
126
|
+
# RUNE
|
127
|
+
|
128
|
+
# Get rune by id
|
129
|
+
# params :
|
130
|
+
# id => integer,
|
131
|
+
# data => hash (version, runeListData) - default => nill,
|
132
|
+
# locale => string ('fr_FR','en_EN', ...) - default => 'fr_FR'
|
133
|
+
client.get_rune_by_id id, data = {:version => num_version, :runeListData => 'all'}, locale = 'fr_FR'
|
134
|
+
|
135
|
+
# Get all rune
|
136
|
+
# params :
|
137
|
+
# data => hash (version, runeListData) - default => nill,
|
138
|
+
# locale => string ('fr_FR','en_EN', ...) - default => 'fr_FR'
|
139
|
+
client.get_all_runes data = {:version => num_version, :runeListData => 'all'}, locale = 'fr_FR'
|
140
|
+
|
141
|
+
# SUMMONER SPELL
|
142
|
+
|
143
|
+
# Get summoner spell by id
|
144
|
+
# params :
|
145
|
+
# id => integer,
|
146
|
+
# data => hash (version, spellData) - default => nill,
|
147
|
+
# locale => string ('fr_FR','en_EN', ...) - default => 'fr_FR'
|
148
|
+
client.get_summoner_spell_by_id id, data = {:version => num_version, :spellData => 'all'}, locale = 'fr_FR'
|
149
|
+
|
150
|
+
# Get all summoner spell
|
151
|
+
# params :
|
152
|
+
# data => hash (version, spellData) - default => nill,
|
153
|
+
# sort_id => boolean - default => false
|
154
|
+
# locale => string ('fr_FR','en_EN', ...) - default => 'fr_FR'
|
155
|
+
client.get_all_summoner_spells data = {:version => num_version, :spellData => 'all'}, sort_id = 'false', locale = 'fr_FR'
|
156
|
+
|
157
|
+
# INFORMATION
|
158
|
+
|
159
|
+
# Get version
|
160
|
+
client.get_versions
|
161
|
+
|
162
|
+
# SUMMONER
|
163
|
+
|
164
|
+
# Create summoner object
|
165
|
+
summoner = client.get_summoner_by_name 'pacoloco'
|
166
|
+
|
167
|
+
# Get sumoner masteries
|
168
|
+
summoner.masteries
|
169
|
+
|
170
|
+
# Get sumoner runes
|
171
|
+
summoner.runes
|
172
|
+
|
173
|
+
# Get sumoner games
|
174
|
+
summoner.games
|
175
|
+
|
176
|
+
# Get sumoner stat_summaries
|
177
|
+
summoner.stat_summaries
|
178
|
+
|
179
|
+
# Get sumoner get_league_stats
|
180
|
+
summoner.get_league_stats
|
26
181
|
|
27
|
-
|
182
|
+
```
|
28
183
|
|
29
184
|
## Contributing
|
30
185
|
|
data/lib/riot_lol_api/client.rb
CHANGED
@@ -3,6 +3,9 @@ require 'json'
|
|
3
3
|
|
4
4
|
module RiotLolApi
|
5
5
|
class Client
|
6
|
+
# Constant URL
|
7
|
+
|
8
|
+
BASE_URL_API = "api.pvp.net/api/lol/"
|
6
9
|
|
7
10
|
# attr
|
8
11
|
# - region
|
@@ -11,25 +14,50 @@ module RiotLolApi
|
|
11
14
|
self.class.send(:attr_accessor, key.to_sym)
|
12
15
|
instance_variable_set("@#{key}", value)
|
13
16
|
end
|
17
|
+
if RiotLolApi::Client.realm.nil? && !self.region.nil?
|
18
|
+
self.get_realm
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
class << self
|
23
|
+
attr_accessor :realm
|
14
24
|
end
|
15
25
|
|
16
|
-
def
|
26
|
+
def get_realm
|
27
|
+
response = Client.get("static-data/#{self.region}/v1.2/realm", "global")
|
28
|
+
unless response.nil?
|
29
|
+
self.class.realm = response
|
30
|
+
else
|
31
|
+
nil
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
# TO DO
|
36
|
+
# Set callback to get realm constants
|
37
|
+
#
|
38
|
+
|
39
|
+
def self.get url, domaine,data = nil
|
17
40
|
unless RiotLolApi::TOKEN.nil?
|
41
|
+
# Set data params
|
18
42
|
if data.nil?
|
19
43
|
data = {:api_key => RiotLolApi::TOKEN}
|
20
44
|
else
|
21
45
|
data.merge!({:api_key => RiotLolApi::TOKEN})
|
22
46
|
end
|
23
|
-
|
47
|
+
|
48
|
+
# Set domaine url
|
49
|
+
domaine_url = "#{domaine}.#{BASE_URL_API}"
|
50
|
+
|
51
|
+
response = HTTParty.get("https://#{domaine_url}#{url}", :query => data)
|
24
52
|
case response.code
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
53
|
+
when 200
|
54
|
+
JSON.parse(response.body)
|
55
|
+
when 404
|
56
|
+
puts "Error server"
|
57
|
+
nil
|
58
|
+
when 500...600
|
59
|
+
puts "ERROR #{response.code}"
|
60
|
+
nil
|
33
61
|
end
|
34
62
|
else
|
35
63
|
puts "No TOKEN, you have to define RiotLolApi::TOKEN"
|
@@ -42,7 +70,7 @@ module RiotLolApi
|
|
42
70
|
def get_summoner_by_name name
|
43
71
|
name = name.downcase
|
44
72
|
name.strip!
|
45
|
-
response = Client.get("
|
73
|
+
response = Client.get("#{@region}/v1.4/summoner/by-name/#{name}",@region)
|
46
74
|
unless response.nil?
|
47
75
|
RiotLolApi::Model::Summoner.new(response[name].to_symbol.merge({:region => @region}))
|
48
76
|
else
|
@@ -51,7 +79,7 @@ module RiotLolApi
|
|
51
79
|
end
|
52
80
|
|
53
81
|
def get_summoner_by_id id
|
54
|
-
response = Client.get("
|
82
|
+
response = Client.get("#{@region}/v1.4/summoner/#{id}",@region)
|
55
83
|
unless response.nil?
|
56
84
|
RiotLolApi::Model::Summoner.new(response[id.to_s].to_symbol.merge({:region => @region}))
|
57
85
|
else
|
@@ -61,20 +89,192 @@ module RiotLolApi
|
|
61
89
|
|
62
90
|
# CHAMPION
|
63
91
|
|
64
|
-
def get_champion_by_id id, data = nil,
|
92
|
+
def get_champion_by_id id, data = nil, locale = 'fr_FR'
|
65
93
|
if data.nil?
|
66
|
-
data = {:
|
94
|
+
data = {:locale => locale}
|
67
95
|
else
|
68
|
-
data.merge!({:
|
96
|
+
data.merge!({:locale => locale})
|
69
97
|
end
|
70
98
|
|
71
|
-
|
72
|
-
|
99
|
+
response = Client.get("static-data/#{@region}/v1.2/champion/#{id}","global",data)
|
100
|
+
unless response.nil?
|
73
101
|
RiotLolApi::Model::Champion.new(response.to_symbol)
|
74
|
-
|
102
|
+
else
|
103
|
+
nil
|
104
|
+
end
|
105
|
+
end
|
106
|
+
|
107
|
+
def get_all_champions data = nil, sort_id = 'false', locale = 'fr_FR'
|
108
|
+
if data.nil?
|
109
|
+
data = {:locale => locale, :dataById => sort_id}
|
110
|
+
else
|
111
|
+
data.merge!({:locale => locale, :dataById => sort_id})
|
112
|
+
end
|
113
|
+
|
114
|
+
response = Client.get("static-data/#{@region}/v1.2/champion","global",data)
|
115
|
+
unless response.nil?
|
116
|
+
tab_champions = Array.new
|
117
|
+
response["data"].each do |champion|
|
118
|
+
tab_champions << RiotLolApi::Model::Champion.new(champion[1].to_symbol)
|
119
|
+
end
|
120
|
+
tab_champions
|
121
|
+
else
|
122
|
+
nil
|
123
|
+
end
|
124
|
+
end
|
125
|
+
|
126
|
+
# ITEM
|
127
|
+
|
128
|
+
def get_all_items data = nil, locale = 'fr_FR'
|
129
|
+
if data.nil?
|
130
|
+
data = {:locale => locale}
|
131
|
+
else
|
132
|
+
data.merge!({:locale => locale})
|
133
|
+
end
|
134
|
+
|
135
|
+
response = Client.get("static-data/#{@region}/v1.2/item","global",data)
|
136
|
+
unless response.nil?
|
137
|
+
tab_items = Array.new
|
138
|
+
response["data"].each do |item|
|
139
|
+
tab_items << RiotLolApi::Model::Item.new(item[1].to_symbol)
|
140
|
+
end
|
141
|
+
tab_items
|
142
|
+
else
|
143
|
+
nil
|
144
|
+
end
|
145
|
+
end
|
146
|
+
|
147
|
+
def get_item_by_id id, data = nil, locale = 'fr_FR'
|
148
|
+
if data.nil?
|
149
|
+
data = {:locale => locale}
|
150
|
+
else
|
151
|
+
data.merge!({:locale => locale})
|
152
|
+
end
|
153
|
+
|
154
|
+
response = Client.get("static-data/#{@region}/v1.2/item/#{id}","global",data)
|
155
|
+
unless response.nil?
|
156
|
+
RiotLolApi::Model::Item.new(response.to_symbol)
|
157
|
+
else
|
75
158
|
nil
|
76
|
-
|
77
|
-
|
159
|
+
end
|
160
|
+
end
|
161
|
+
|
162
|
+
# MASTERY
|
163
|
+
|
164
|
+
def get_all_masteries data = nil, locale = 'fr_FR'
|
165
|
+
if data.nil?
|
166
|
+
data = {:locale => locale}
|
167
|
+
else
|
168
|
+
data.merge!({:locale => locale})
|
169
|
+
end
|
170
|
+
|
171
|
+
response = Client.get("static-data/#{@region}/v1.2/mastery","global",data)
|
172
|
+
unless response.nil?
|
173
|
+
tab_masteries = Array.new
|
174
|
+
response["data"].each do |mastery|
|
175
|
+
tab_masteries << RiotLolApi::Model::Mastery.new(mastery[1].to_symbol)
|
176
|
+
end
|
177
|
+
tab_masteries
|
178
|
+
else
|
179
|
+
nil
|
180
|
+
end
|
181
|
+
end
|
182
|
+
|
183
|
+
def get_mastery_by_id id, data = nil, locale = 'fr_FR'
|
184
|
+
if data.nil?
|
185
|
+
data = {:locale => locale}
|
186
|
+
else
|
187
|
+
data.merge!({:locale => locale})
|
188
|
+
end
|
189
|
+
|
190
|
+
response = Client.get("static-data/#{@region}/v1.2/mastery/#{id}","global",data)
|
191
|
+
unless response.nil?
|
192
|
+
RiotLolApi::Model::Mastery.new(response.to_symbol)
|
193
|
+
else
|
194
|
+
nil
|
195
|
+
end
|
196
|
+
end
|
197
|
+
|
198
|
+
# RUNE
|
199
|
+
|
200
|
+
def get_all_runes data = nil, locale = 'fr_FR'
|
201
|
+
if data.nil?
|
202
|
+
data = {:locale => locale}
|
203
|
+
else
|
204
|
+
data.merge!({:locale => locale})
|
205
|
+
end
|
206
|
+
|
207
|
+
response = Client.get("static-data/#{@region}/v1.2/rune","global",data)
|
208
|
+
unless response.nil?
|
209
|
+
tab_runes = Array.new
|
210
|
+
response["data"].each do |rune|
|
211
|
+
tab_runes << RiotLolApi::Model::Rune.new(rune[1].to_symbol)
|
212
|
+
end
|
213
|
+
tab_runes
|
214
|
+
else
|
215
|
+
nil
|
216
|
+
end
|
217
|
+
end
|
218
|
+
|
219
|
+
def get_rune_by_id id, data = nil, locale = 'fr_FR'
|
220
|
+
if data.nil?
|
221
|
+
data = {:locale => locale}
|
222
|
+
else
|
223
|
+
data.merge!({:locale => locale})
|
224
|
+
end
|
225
|
+
|
226
|
+
response = Client.get("static-data/#{@region}/v1.2/rune/#{id}","global",data)
|
227
|
+
unless response.nil?
|
228
|
+
RiotLolApi::Model::Rune.new(response.to_symbol)
|
229
|
+
else
|
230
|
+
nil
|
231
|
+
end
|
232
|
+
end
|
233
|
+
|
234
|
+
# SUMMONER SPELL
|
235
|
+
|
236
|
+
def get_all_summoner_spells data = nil, sort_id = 'false', locale = 'fr_FR'
|
237
|
+
if data.nil?
|
238
|
+
data = {:locale => locale, :dataById => sort_id}
|
239
|
+
else
|
240
|
+
data.merge!({:locale => locale, :dataById => sort_id})
|
241
|
+
end
|
242
|
+
|
243
|
+
response = Client.get("static-data/#{@region}/v1.2/summoner-spell","global",data)
|
244
|
+
unless response.nil?
|
245
|
+
tab_summoner_spells = Array.new
|
246
|
+
response["data"].each do |summoner_spell|
|
247
|
+
tab_summoner_spells << RiotLolApi::Model::Spell.new(summoner_spell[1].to_symbol)
|
248
|
+
end
|
249
|
+
tab_summoner_spells
|
250
|
+
else
|
251
|
+
nil
|
252
|
+
end
|
253
|
+
end
|
254
|
+
|
255
|
+
def get_summoner_spell_by_id id, data = nil, locale = 'fr_FR'
|
256
|
+
if data.nil?
|
257
|
+
data = {:locale => locale}
|
258
|
+
else
|
259
|
+
data.merge!({:locale => locale})
|
260
|
+
end
|
261
|
+
|
262
|
+
response = Client.get("static-data/#{@region}/v1.2/summoner-spell/#{id}","global",data)
|
263
|
+
unless response.nil?
|
264
|
+
RiotLolApi::Model::Spell.new(response.to_symbol)
|
265
|
+
else
|
266
|
+
nil
|
267
|
+
end
|
268
|
+
end
|
269
|
+
|
270
|
+
def get_versions
|
271
|
+
response = Client.get("static-data/#{@region}/v1.2/versions","global")
|
272
|
+
unless response.nil?
|
273
|
+
response
|
274
|
+
else
|
275
|
+
nil
|
276
|
+
end
|
277
|
+
end
|
78
278
|
|
79
279
|
end
|
80
280
|
end
|