gun_broker 1.1.1 → 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bdbc225a8faddca613c61a1d81598020abdefc19
|
4
|
+
data.tar.gz: 0e9c07e0fc088cc3f4e95cc515a04737a26137f3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7498760b3f7632994a5dad9c440ee5bfba466c60f02d31654ca9aab516d918f97b61b637510b6fc11ee012117af3d54835c442e164e5da6c409aad5fc6c0c4cd
|
7
|
+
data.tar.gz: 01e9a3660f396d7abb92e5765bcdac2fc8aa05adcde0f2109c2968a207f05dee0a81fa43247fe3dea1f41ba753850df1ab7eb0054fbf155a0e6e12d07d796fba
|
@@ -7,13 +7,6 @@ module GunBroker
|
|
7
7
|
|
8
8
|
include GunBroker::TokenHeader
|
9
9
|
|
10
|
-
# Constants to use with the `SellingStatus` param.
|
11
|
-
SELLING_STATUS = {
|
12
|
-
both: 0,
|
13
|
-
selling: 1,
|
14
|
-
not_selling: 2,
|
15
|
-
}
|
16
|
-
|
17
10
|
# @param user [User] A {User} instance to scope items by.
|
18
11
|
def initialize(user)
|
19
12
|
@user = user
|
@@ -25,9 +18,9 @@ module GunBroker
|
|
25
18
|
# @raise [GunBroker::Error::RequestError] If there's an issue with the request (usually a `5xx` response).
|
26
19
|
# @return [Array<Item>]
|
27
20
|
def all
|
21
|
+
# NOTE: this endpoint will not return items that were sold
|
28
22
|
response = GunBroker::API.get('/Items', {
|
29
23
|
'SellerName' => @user.username,
|
30
|
-
'SellingStatus' => SELLING_STATUS[:both],
|
31
24
|
'PageSize' => GunBroker::API::PAGE_SIZE
|
32
25
|
}, token_header(@user.token))
|
33
26
|
items_from_results(response['results'])
|
@@ -106,7 +99,6 @@ module GunBroker
|
|
106
99
|
'ItemID' => (options[:item_id] || options["ItemID"]),
|
107
100
|
'PageSize' => GunBroker::API::PAGE_SIZE,
|
108
101
|
'SellerName' => @user.username,
|
109
|
-
'SellingStatus' => SELLING_STATUS[:selling],
|
110
102
|
}.delete_if { |k, v| v.nil? }
|
111
103
|
|
112
104
|
response = GunBroker::API.get('/Items', parameters, token_header(@user.token))
|
data/lib/gun_broker/version.rb
CHANGED
@@ -17,7 +17,6 @@ describe GunBroker::User::ItemsDelegate do
|
|
17
17
|
headers: headers('X-AccessToken' => token),
|
18
18
|
query: {
|
19
19
|
'SellerName' => user.username,
|
20
|
-
'SellingStatus' => GunBroker::User::ItemsDelegate::SELLING_STATUS[:both],
|
21
20
|
'PageSize' => GunBroker::API::PAGE_SIZE
|
22
21
|
}
|
23
22
|
)
|
@@ -35,7 +34,6 @@ describe GunBroker::User::ItemsDelegate do
|
|
35
34
|
headers: headers('X-AccessToken' => token),
|
36
35
|
query: {
|
37
36
|
'SellerName' => user.username,
|
38
|
-
'SellingStatus' => GunBroker::User::ItemsDelegate::SELLING_STATUS[:both],
|
39
37
|
'PageSize' => GunBroker::API::PAGE_SIZE
|
40
38
|
}
|
41
39
|
)
|
@@ -91,7 +89,6 @@ describe GunBroker::User::ItemsDelegate do
|
|
91
89
|
headers: headers('X-AccessToken' => token),
|
92
90
|
query: {
|
93
91
|
'SellerName' => user.username,
|
94
|
-
'SellingStatus' => GunBroker::User::ItemsDelegate::SELLING_STATUS[:both],
|
95
92
|
'PageSize' => GunBroker::API::PAGE_SIZE
|
96
93
|
}
|
97
94
|
)
|
@@ -113,7 +110,6 @@ describe GunBroker::User::ItemsDelegate do
|
|
113
110
|
headers: headers('X-AccessToken' => token),
|
114
111
|
query: {
|
115
112
|
'SellerName' => user.username,
|
116
|
-
'SellingStatus' => GunBroker::User::ItemsDelegate::SELLING_STATUS[:both],
|
117
113
|
'PageSize' => GunBroker::API::PAGE_SIZE
|
118
114
|
}
|
119
115
|
)
|
@@ -138,7 +134,6 @@ describe GunBroker::User::ItemsDelegate do
|
|
138
134
|
headers: headers('X-AccessToken' => token),
|
139
135
|
query: {
|
140
136
|
'SellerName' => user.username,
|
141
|
-
'SellingStatus' => GunBroker::User::ItemsDelegate::SELLING_STATUS[:both],
|
142
137
|
'PageSize' => GunBroker::API::PAGE_SIZE
|
143
138
|
}
|
144
139
|
)
|
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.1.
|
4
|
+
version: 1.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dale Campbell
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-08
|
11
|
+
date: 2016-09-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|