livingsocial2 0.0.4 → 0.0.6
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.
- data/README.md +53 -13
- data/lib/livingsocial2/version.rb +1 -1
- data/livingsocial2.gemspec +2 -2
- metadata +10 -10
data/README.md
CHANGED
@@ -21,33 +21,73 @@ Or install it yourself as:
|
|
21
21
|
|
22
22
|
There are currently 2 class level methods for interacting with the gem.
|
23
23
|
### Method 1
|
24
|
-
|
24
|
+
|
25
|
+
Livingsocial2::Deal.find_by_ls_market(deal_type, market)
|
26
|
+
#=> returns a collection of deals objects that match both the deal_type and the LS market of interest.
|
25
27
|
|
26
28
|
### Example call
|
27
|
-
|
29
|
+
|
30
|
+
Livingsocial2::Deal.find_by_ls_market(:local, 'Buffalo')
|
28
31
|
|
29
32
|
### Method 2
|
30
|
-
Livingsocial2::Deal.find_near(deal_type, lat, long, distance)
|
33
|
+
Livingsocial2::Deal.find_near(deal_type, lat, long, distance)
|
34
|
+
#=> returns a collection of deal objects that match the deal type and that are within the specified distance of the lat and long passed in.
|
31
35
|
|
32
36
|
### Example call
|
33
|
-
|
37
|
+
|
38
|
+
Livingsocial2::Deal.find_near(:all, 40.7518481, -73.97551399999999, 1)
|
34
39
|
|
35
40
|
Distance is the radius desired, measured in miles. For example, the above example is asking for all the deals within a 1 mile radius of the passed in location (Lexington, NY).
|
36
41
|
|
37
42
|
If no distance is specified - it will default to 3 miles.
|
43
|
+
|
38
44
|
### What's the deal with deal_type
|
39
45
|
deal_type allows you to specify what LS vertical you are interested in. Currently, the atom feed supplies 4 types of deals.
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
46
|
+
+ Local Deals
|
47
|
+
+ At Home Deals
|
48
|
+
+ Families Deals
|
49
|
+
+ Gourmet Deals
|
44
50
|
|
45
51
|
### To specify a deal_type pass in one of the following symbols
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
52
|
+
|
53
|
+
:local #=> local deals
|
54
|
+
|
55
|
+
:at_home #=> at home deals
|
56
|
+
|
57
|
+
:family #=> family deals
|
58
|
+
|
59
|
+
:gourmet #=> gourmet deals
|
60
|
+
|
61
|
+
:all #=> combination of all the above
|
62
|
+
|
63
|
+
### A Deal instance will include the following attributes
|
64
|
+
:ls_id
|
65
|
+
:published
|
66
|
+
:link
|
67
|
+
:title
|
68
|
+
:long_title
|
69
|
+
:deal_type
|
70
|
+
:merchandise_type
|
71
|
+
:market_id
|
72
|
+
:market_name
|
73
|
+
:market_location, type: Array
|
74
|
+
:featureType
|
75
|
+
:country_code
|
76
|
+
:subtitle
|
77
|
+
:offer_ends_at
|
78
|
+
:price
|
79
|
+
:value
|
80
|
+
:savings
|
81
|
+
:order_count
|
82
|
+
:merchant_type
|
83
|
+
:image_url
|
84
|
+
:categories
|
85
|
+
:sold_out
|
86
|
+
:national
|
87
|
+
:description
|
88
|
+
:details
|
89
|
+
:content
|
90
|
+
:merchant
|
51
91
|
|
52
92
|
## Contributing
|
53
93
|
|
data/livingsocial2.gemspec
CHANGED
@@ -16,6 +16,6 @@ Gem::Specification.new do |gem|
|
|
16
16
|
gem.version = Livingsocial2::VERSION
|
17
17
|
|
18
18
|
gem.add_development_dependency('rspec')
|
19
|
-
gem.
|
20
|
-
gem.
|
19
|
+
gem.add_runtime_dependency('mongoid')
|
20
|
+
gem.add_runtime_dependency('bson_ext')
|
21
21
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: livingsocial2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-07-
|
12
|
+
date: 2012-07-18 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|
16
|
-
requirement: &
|
16
|
+
requirement: &70326554763400 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,29 +21,29 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70326554763400
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: mongoid
|
27
|
-
requirement: &
|
27
|
+
requirement: &70326554762780 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: '0'
|
33
|
-
type: :
|
33
|
+
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70326554762780
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: bson_ext
|
38
|
-
requirement: &
|
38
|
+
requirement: &70326554762000 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
42
42
|
- !ruby/object:Gem::Version
|
43
43
|
version: '0'
|
44
|
-
type: :
|
44
|
+
type: :runtime
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *70326554762000
|
47
47
|
description: Wrapper for the livingsocial atom feed
|
48
48
|
email:
|
49
49
|
- michael.v.verdi@gmail.com
|