blomming_api 0.4.1 → 0.4.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7c2456b1f3eb51b26cc2aae945cef36703ca9db8
4
- data.tar.gz: e1e42675078f500ce983a3693b8d956101fa208d
3
+ metadata.gz: 40ff555448ed2878816e332e6317be02736c8687
4
+ data.tar.gz: 65c583d94cc89a3bc7e132dbad16ad3b119b2bb4
5
5
  SHA512:
6
- metadata.gz: 33ead1f763c3de18beae8866d348f52afe2651c7fc70817e87c97df7445459a42551c185ad02c0227e76457e0b06e79ea6fff0e45cd62cfcd12d0566a7788764
7
- data.tar.gz: 8b5f3d687c512039f06cb3b462097ad24f5c2af0670dbae0cdb305434b5185b23866761eb93cd50e167b7dfdf1dbfd0863f55a870ebebdf1ead0fbff2463bce1
6
+ metadata.gz: b290a3bc6cd3febbcbad37da51a414c44460fb226b18cb242d977a482735b4a48663aec300beb1637944b21a727aa827672c284d5e051069b9dc3e98b1a336b8
7
+ data.tar.gz: e1b55e7819b70ff46867d89638825e58263bdf5822c54cbbc181e27f60c9ed1c58f3ea6c31b091d53b9cc80aa3ff2afa1031a90774b663ceec5b1c2bf120f49c
@@ -19,7 +19,23 @@ module BlommingApi
19
19
  end
20
20
 
21
21
  #
22
- # private helper: manage RestClient exceptions. iterator.
22
+ # load_or_retry: manage RestClient exceptions. iterator.
23
+ #
24
+ # === attributes
25
+ #
26
+ # retry_seconds
27
+ # number of seconds between a call and the successivem in case of a retry
28
+ #
29
+ # &restclient_call_block
30
+ # the block to be passed (containing call to RestCient method)
31
+ #
32
+ # === examples
33
+ #
34
+ # load_or_retry { RestClient.get url, req }
35
+ #
36
+ # load_or_retry(5) do
37
+ # RestClient.get url, req
38
+ # end
23
39
  #
24
40
  def load_or_retry (retry_seconds=2, &restclient_call_block)
25
41
  begin
@@ -8,12 +8,25 @@ module BlommingApi
8
8
  #
9
9
  # all_pages
10
10
  # It's a Ruby block iterator that retrieve all items of all pages of any API endpoint.
11
- # Usage example:
12
- # all_pages { |page, per_page|
11
+ #
12
+ # === attributes
13
+ #
14
+ # +verbose+: :quite (silent mode)
15
+ # :stdout (verbose mode: stdout puts)
16
+ #
17
+ # +per_page+: :number of items returned from a single page
18
+ #
19
+ #
20
+ # === examples
21
+ #
22
+ # all_pages(:stdout, 64) do |page, per_page|
13
23
  # client.shop_items(shop_id, {:page => page, :per_page => per_page})
14
- # }
24
+ # end
25
+ #
26
+ # all_pages { |page, per_page| c.sell_shop_items page: page, per_page: per_page }
27
+ #
15
28
  #
16
- def all_pages (verbose=:stdout, per_page=16, &endpoint_call_block)
29
+ def all_pages (verbose=:quite, per_page=16, &endpoint_call_block)
17
30
  page = 1
18
31
  data = []
19
32
 
@@ -1,3 +1,3 @@
1
1
  module BlommingApi
2
- VERSION = "0.4.1"
2
+ VERSION = "0.4.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blomming_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Giorgio Robino