quimby 0.4.1 → 0.4.2

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -8,10 +8,12 @@ It's a Foursquare API wrapper. It uses objects instead of hashes, and tries to b
8
8
 
9
9
  Install it as a gem (in your `Gemfile`)
10
10
 
11
- gem "quimby", :require => 'foursquare'
11
+ gem "quimby"
12
12
 
13
13
  ## Usage
14
14
 
15
+ ### For a good start, check out the example Rails app: [github.com/pierrevalade/foursquare-rails-examples](https://github.com/pierrevalade/foursquare-rails-examples)
16
+
15
17
  Get a foursquare:
16
18
 
17
19
  foursquare = Foursquare::Base.new("ACCESS_TOKEN")
@@ -0,0 +1,52 @@
1
+ # https://developer.foursquare.com/docs/responses/venue.html
2
+
3
+ module Foursquare
4
+ class Location
5
+
6
+ # this enabled the previous app to work with this new version where Location is now an object
7
+ def [](key)
8
+ @json[key]
9
+ end
10
+
11
+ def initialize(json)
12
+ @json = json
13
+ end
14
+
15
+ def address
16
+ @json["address"]
17
+ end
18
+
19
+ def cross_street
20
+ @json["crossStreet"]
21
+ end
22
+
23
+ def city
24
+ @json["city"]
25
+ end
26
+
27
+ def state
28
+ @json["state"]
29
+ end
30
+
31
+ def postal_code
32
+ @json["postalCode"]
33
+ end
34
+
35
+ def country
36
+ @json["country"]
37
+ end
38
+
39
+ def lat
40
+ @json["lat"]
41
+ end
42
+
43
+ def lng
44
+ @json["lng"]
45
+ end
46
+
47
+ def distance
48
+ @json["distance"]
49
+ end
50
+
51
+ end
52
+ end
data/lib/foursquare.rb CHANGED
@@ -14,6 +14,8 @@ require "foursquare/venue"
14
14
  require "foursquare/settings"
15
15
  require "foursquare/tip"
16
16
  require "foursquare/photo"
17
+ require "foursquare/location"
18
+ require "foursquare/category"
17
19
 
18
20
  module Foursquare
19
21
  class Error < StandardError ; end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: quimby
3
3
  version: !ruby/object:Gem::Version
4
- hash: 13
4
+ hash: 11
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 4
9
- - 1
10
- version: 0.4.1
9
+ - 2
10
+ version: 0.4.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Pat Nakajima
@@ -15,8 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-01-14 00:00:00 -05:00
19
- default_executable:
18
+ date: 2011-01-14 00:00:00 Z
20
19
  dependencies:
21
20
  - !ruby/object:Gem::Dependency
22
21
  name: typhoeus
@@ -62,6 +61,7 @@ files:
62
61
  - lib/foursquare/tip.rb
63
62
  - lib/foursquare/multi.rb
64
63
  - lib/foursquare/checkin.rb
64
+ - lib/foursquare/location.rb
65
65
  - lib/foursquare/photo.rb
66
66
  - lib/foursquare/checkin_proxy.rb
67
67
  - lib/foursquare/user.rb
@@ -69,7 +69,6 @@ files:
69
69
  - lib/foursquare/venue.rb
70
70
  - lib/foursquare/venue_proxy.rb
71
71
  - spec/THERE_ARENT_ANY
72
- has_rdoc: true
73
72
  homepage: https://github.com/groupme/quimby
74
73
  licenses: []
75
74
 
@@ -99,7 +98,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
99
98
  requirements: []
100
99
 
101
100
  rubyforge_project:
102
- rubygems_version: 1.4.1
101
+ rubygems_version: 1.8.2
103
102
  signing_key:
104
103
  specification_version: 3
105
104
  summary: A Foursquare API wrapper