gun_broker 1.4.5 → 1.4.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/gun_broker/user/items_delegate.rb +8 -13
- data/lib/gun_broker/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b9990f619cea255084ff3c897efaf027fa5d4575
|
4
|
+
data.tar.gz: a902b6b9d8f866c4cfc1d7fa9f85d8fd0afac29e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e981022683b9263b23a8da740fedd50079d3f40026b865efd5f9ad6ece04379f40c030bb795c0ff1987e26f84267a470d82c2f06bfe380766bda8f9ccdac50a0
|
7
|
+
data.tar.gz: 97a4210431f36a1d6c5b91cd8727f9530a9b1a3c68702d1005c2a32c0e7f1dcd66d1e8d088793df3034a8c29d344db2d8038250a226f11ab17fcb60fdff7d69a
|
@@ -71,8 +71,8 @@ module GunBroker
|
|
71
71
|
# Items the User has bid on, but not won.
|
72
72
|
# @note {API#get! GET} /ItemsNotWon
|
73
73
|
# @return [Array<Item>]
|
74
|
-
def not_won
|
75
|
-
@not_won ||= fetch_items(:ItemsNotWon, params_for(:timeframe))
|
74
|
+
def not_won(options = {})
|
75
|
+
@not_won ||= fetch_items(:ItemsNotWon, params_for(:timeframe, options))
|
76
76
|
end
|
77
77
|
|
78
78
|
# Returns Items that are currently selling.
|
@@ -82,12 +82,7 @@ module GunBroker
|
|
82
82
|
# @raise [GunBroker::Error::RequestError] If there's an issue with the request (usually a `5xx` response).
|
83
83
|
# @return [Array<Item>]
|
84
84
|
def selling(options = {})
|
85
|
-
|
86
|
-
*params_for(:sellername),
|
87
|
-
*params_for(:itemid, options)
|
88
|
-
].to_h
|
89
|
-
|
90
|
-
@selling ||= fetch_items(:Items, params)
|
85
|
+
@selling ||= fetch_items(:ItemsSelling, params_for(:itemid, options))
|
91
86
|
end
|
92
87
|
|
93
88
|
# Items the User has sold.
|
@@ -96,7 +91,7 @@ module GunBroker
|
|
96
91
|
# @return [Array<Item>]
|
97
92
|
def sold(options = {})
|
98
93
|
params = [
|
99
|
-
*params_for(:timeframe),
|
94
|
+
*params_for(:timeframe, options),
|
100
95
|
*params_for(:itemid, options)
|
101
96
|
].to_h
|
102
97
|
|
@@ -109,7 +104,7 @@ module GunBroker
|
|
109
104
|
# @return [Array<Item>]
|
110
105
|
def unsold(options = {})
|
111
106
|
params = [
|
112
|
-
*params_for(:timeframe),
|
107
|
+
*params_for(:timeframe, options),
|
113
108
|
*params_for(:itemid, options)
|
114
109
|
].to_h
|
115
110
|
|
@@ -139,8 +134,8 @@ module GunBroker
|
|
139
134
|
# Items the User has won.
|
140
135
|
# @note {API#get! GET} /ItemsWon
|
141
136
|
# @return [Array<Item>]
|
142
|
-
def won
|
143
|
-
@won ||= fetch_items(:ItemsWon, params_for(:timeframe))
|
137
|
+
def won(options = {})
|
138
|
+
@won ||= fetch_items(:ItemsWon, params_for(:timeframe, options))
|
144
139
|
end
|
145
140
|
|
146
141
|
private
|
@@ -180,7 +175,7 @@ module GunBroker
|
|
180
175
|
when :sellername
|
181
176
|
{ 'SellerName' => @user.username }
|
182
177
|
when :timeframe
|
183
|
-
{ 'TimeFrame' => GunBroker::API::MAX_ITEMS_TIME_FRAME }
|
178
|
+
{ 'TimeFrame' => (options[:timeframe] || GunBroker::API::MAX_ITEMS_TIME_FRAME) }
|
184
179
|
when :itemid
|
185
180
|
{ 'ItemID' => (options[:item_id] || options["ItemID"]) }
|
186
181
|
else
|
data/lib/gun_broker/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gun_broker
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dale Campbell
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-11-
|
11
|
+
date: 2018-11-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|