gun_broker 1.3.0 → 1.3.1
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/api.rb +3 -0
- data/lib/gun_broker/items_as_page.rb +2 -1
- data/lib/gun_broker/user/items_delegate.rb +6 -2
- 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: ee62a2f7ba855ae1ab273fb835e4f409618ec80f
|
4
|
+
data.tar.gz: 9a82f711c82e128281e4a1a8008770958f5b6ffa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ff7a88de4b27ed07c443324fef32ed2e3e5e728d4b7878decd0a7040971e597ee5ffa78df7a5574a8b8bd1de3ba9bc680a92266378f3cee54e8b73f991080dec
|
7
|
+
data.tar.gz: 2866e8691ff60d72212d823a9d510b99a7531e790ac0ca7ab8260535a70dbc52c979899527270f75e2717473da7f0a86752435bb3512b3efcc1f79e0b3cc10a7
|
data/lib/gun_broker/api.rb
CHANGED
@@ -15,6 +15,9 @@ module GunBroker
|
|
15
15
|
# Used to return the maximum number of results from paginated responses.
|
16
16
|
PAGE_SIZE = 300
|
17
17
|
|
18
|
+
# Defaults to 12 (View Last 30 Days), so we need to specify 1 (View All Completed) to get everything.
|
19
|
+
TIME_FRAME = 1
|
20
|
+
|
18
21
|
USER_AGENT = "gun_broker rubygems.org/gems/gun_broker v(#{GunBroker::VERSION})"
|
19
22
|
|
20
23
|
# @param path [String] The requested API endpoint.
|
@@ -11,7 +11,8 @@ module GunBroker
|
|
11
11
|
def fetch_items
|
12
12
|
@attributes[:params].merge!({
|
13
13
|
'PageIndex' => @attributes[:page_index],
|
14
|
-
'PageSize' => @attributes[:page_size]
|
14
|
+
'PageSize' => @attributes[:page_size],
|
15
|
+
'TimeFrame' => GunBroker::API::TIME_FRAME,
|
15
16
|
})
|
16
17
|
response = GunBroker::API.get(@attributes[:endpoint], @attributes[:params], @attributes[:token_header])
|
17
18
|
|
@@ -142,9 +142,13 @@ module GunBroker
|
|
142
142
|
|
143
143
|
private
|
144
144
|
|
145
|
-
def fetch_items(endpoint, params = {})
|
145
|
+
def fetch_items(endpoint, params = {})\
|
146
|
+
params.merge!({
|
147
|
+
'PageSize' => GunBroker::API::PAGE_SIZE,
|
148
|
+
'TimeFrame' => GunBroker::API::TIME_FRAME,
|
149
|
+
})
|
150
|
+
|
146
151
|
endpoint = ['/', endpoint.to_s].join
|
147
|
-
params.merge!({ 'PageSize' => GunBroker::API::PAGE_SIZE })
|
148
152
|
response = GunBroker::API.get(endpoint, params, token_header(@user.token))
|
149
153
|
number_of_pages = (response['count'] / GunBroker::API::PAGE_SIZE.to_f).ceil
|
150
154
|
|
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.3.
|
4
|
+
version: 1.3.1
|
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
|
+
date: 2018-05-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|