rsqoot 0.3.0 → 0.3.1

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.
Files changed (4) hide show
  1. checksums.yaml +8 -8
  2. data/README.md +19 -9
  3. data/lib/rsqoot/version.rb +1 -1
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- OTA2NTI1OGNiM2VkN2NmMTM5ODRiMDE3NTI5Y2Q5NjYxMGNiYjBiMQ==
4
+ ZDQ3NWRjNTk3MGE1Mzc0Mjk0MDM5MDgxYzIwMGNhOGFmYTllMTY1OA==
5
5
  data.tar.gz: !binary |-
6
- ZWU5MmJjNjU2NzJiZGJhZDMzYTJjZWViMjNiMGQ4N2RhZWExNTkyMA==
6
+ NTlkNzQ4NDgyZjViNzJkZDMxMTc0YjMyNTg5ZmVlZWI4MjUyY2Y5ZQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- MTA4NGM0MjI0YTk0MGMyZjRlZjA3NjI5YWE5MzhkNTA3NWU0ZmVjMzQyZWY0
10
- YWMzODFhZGFkMzdjODc4MDZmNmQyNThjNTJmNTJjNTAzNTg2MWQ3MTBiNTQy
11
- ZTRmOTk0NzdkNzhhOGNhMGJjMTAwNTQ2ZWZiNjE4MmJiOTc1OTM=
9
+ OGI5N2Q3YjJiNjFiMWUyZjlmMjY2NTFiNDNlZGI4MjQwMDQ4ZTYzNTdkNjc3
10
+ NmQ1ODAzNTVmMTVkYzJhN2Q2MDZkNjVlMzgzNGM3OGI3YzdiNjU4Nzk1MmVi
11
+ ZjcxY2FhNjg5MjNmNTBmODUxYmE0Yjc4MWY3YzJlMDU4NGNkNGY=
12
12
  data.tar.gz: !binary |-
13
- YzQ1OTI4NDNkMDI3NzBhYjhiYTY1MDRkYTI3OGI0MWRjNWNjMTQyZWU0MWI5
14
- NTQxZTdiYzg0NmM1MDE4Y2MwMWNiNGQ2M2U3MTY3YmZjMWU3ZDEyMTAxNzYw
15
- NTRiOGRmMjA3YzExMTk1NjRhYTI4MWY4OTVkYzkzY2VkZDJjYzU=
13
+ ZTU1ZmUyM2U0YTFlNjI3ODM4YjI4ZDUyYzhlMDc2YzIxOTA1Zjc1ZjQ1MjNj
14
+ NDA4Mjk5ZWFmODExNzVhMjUxYTM1NmZjZjI5NzA5NzY5MzgyYzFkZjM0ZTM1
15
+ MmJlYTBjNGU5MWY0OWFkY2Y1ZmVjOTQ1ZjJjNDY4MzAyNDJmYzA=
data/README.md CHANGED
@@ -46,18 +46,18 @@ You can also change your configuration in your instance, such as below:
46
46
  sqoot.deals
47
47
  #=> returns a list of deals
48
48
 
49
- sqoot.deals(:location => 'Chicago')
49
+ sqoot.deals(location: 'Chicago')
50
50
 
51
- sqoot.deals(:location => 'Chicago', :per_page => 10)
51
+ sqoot.deals(location: 'Chicago', per_page: 10)
52
52
 
53
- sqoot.deals(:location => 'Chicago', :per_page => 10, :categories => 'health-beauty', :page => 2)
53
+ sqoot.deals(location: 'Chicago', per_page: 10, categories: 'health-beauty', page: 2)
54
54
 
55
- sqoot.deals(:price_at_least => 10, :order => commission)
55
+ sqoot.deals(price_at_least: 10, order: :commission_desc)
56
56
 
57
- sqoot.deal_impression(1555288, geometry: '250x250C')
58
- # => return a image url which size is 250x250
57
+ sqoot.impression(1555288, geometry: '250x250C')
58
+ # => return deal_id 1555288's image url which size is 250x250
59
59
 
60
- sqoot.deal_click(1555288)
60
+ sqoot.deal(1555288).url
61
61
  # => return a click url which will redirect to another url
62
62
 
63
63
  sqoot.providers
@@ -66,15 +66,25 @@ You can also change your configuration in your instance, such as below:
66
66
  sqoot.commissions
67
67
  # => returns current month commissions
68
68
 
69
- sqoot.commissions(:to => '2012-01-01', :from => '2012-01-20')
69
+ sqoot.commissions(to: '2012-01-01', from: '2012-01-20')
70
70
  # => returns commissions using date_range :to & :from
71
71
 
72
72
  sqoot.clicks
73
73
  # => returns real-time clicks from the event request limit of 1000
74
74
 
75
- sqoot.clicks(:to => '2012-01-01', :from => '2012-01-20')
75
+ sqoot.clicks(to: '2012-01-01', from: '2012-01-20')
76
76
  # => returns clicks using date_range :to & :from
77
77
 
78
+ #### Auto Cache
79
+
80
+ Please notice that each query with above methods will cache the result except for sqoot.clicks
81
+
82
+ If you want to fetch the newest records each time, you can do as below:
83
+
84
+ sqoot.deals(location: 'Chicago', time: Time.now)
85
+
86
+ By this, it will update the cache by each query.
87
+
78
88
  ## Contributing
79
89
 
80
90
  1. Fork it
@@ -1,3 +1,3 @@
1
1
  module RSqoot
2
- VERSION = '0.3.0'
2
+ VERSION = '0.3.1'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rsqoot
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Felix Liu