wavefront-sdk 0.2.1 → 0.2.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: 60f40b9ab4224264a6998a9b7a356c32e141b0ff
4
- data.tar.gz: b5482478d76f80d8a012c2999661b22bfe813cfe
3
+ metadata.gz: ff8c467f5b0500ea1052bbbfb024585e1b124e3a
4
+ data.tar.gz: 7db790c982150218b285232b6fba145e687a5f18
5
5
  SHA512:
6
- metadata.gz: a7f48fcbf857029e45eb59f4ea347e21cbae01d98632ed6940248db5ce5e3517405f6351ded2539f7cd9aa9553c9c5a1c8c5333d5d71bf5770c871d2d31540c4
7
- data.tar.gz: dbf9ac5c209c934a40b396bae63f799f7403c9f995c988912927470589d0a7c0badd15d5b43a30ae9c8d4bf7c842034dca3f19825b6ec0b5171f8b3f087c6cfd
6
+ metadata.gz: b83f2c2348f9bbeb3c740cfbfe652f46114e8d39a01462467189ddb4fd58bac093e39c9d8701308754cbb48ead1d693dc7d402db015823a7f529f8f601e17fe7
7
+ data.tar.gz: 6d6f034907ce032483bf8c4d461ab944968e0b20d6b6c72b2398f211bc937bdeb4a5a31061ab081c52de4ce097f8e6cd8218da1ecec9a42caa01bdaf22a71eac
@@ -19,7 +19,7 @@ module Wavefront
19
19
  # @param to [Time, Integer] end ot time range. Can be epoch
20
20
  # millisecods or a Ruby time. If not supplied, defaults to the
21
21
  # current time.
22
- # @param cursor [String] I think this must start with a timestamp.
22
+ # @param cursor [String] event from which to start listing
23
23
  # @param limit [Integer] the number of events to return
24
24
  # @return [Wavefront::Response]
25
25
  #
@@ -12,12 +12,16 @@ module Wavefront
12
12
  # GET /api/v2/source
13
13
  # Get all sources for a customer
14
14
  #
15
- # @param offset [Int] source at which the list begins
16
- # @param limit [Int] the number of sources to return
15
+ # @param limit [Integer] the number of sources to return
16
+ # @param cursor [String] source at which the list begins
17
17
  # @return [Wavefront::Response]
18
18
  #
19
- def list(offset = 0, limit = 100)
20
- api_get('', { offset: offset, limit: limit })
19
+ def list(limit = nil, cursor = nil)
20
+ qs = {}
21
+ qs[:limit] = limit if limit
22
+ qs[:cursor] = cursor if cursor
23
+
24
+ api_get('', qs)
21
25
  end
22
26
 
23
27
  # POST /api/v2/source
@@ -1 +1 @@
1
- WF_SDK_VERSION = '0.2.1'.freeze
1
+ WF_SDK_VERSION = '0.2.2'.freeze
@@ -154,4 +154,3 @@ class Hash
154
154
  Marshal.load(Marshal.dump(self))
155
155
  end
156
156
  end
157
-
@@ -15,7 +15,10 @@ SOURCE_BODY = {
15
15
  #
16
16
  class WavefrontSourceTest < WavefrontTestBase
17
17
  def test_list
18
- should_work(:list, 10, '?offset=10&limit=100')
18
+ should_work(:list, [], '')
19
+ should_work(:list, 10, '?limit=10')
20
+ should_work(:list, [10, 'mysource'], '?limit=10&cursor=mysource')
21
+ should_work(:list, [nil, 'mysource'], '?cursor=mysource')
19
22
  end
20
23
 
21
24
  def test_create
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wavefront-sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robert Fisher