john-mayer 0.0.2 → 0.0.3
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 +1 -1
- data/lib/foursquare/checkin.rb +7 -0
- data/lib/foursquare/checkin_proxy.rb +12 -0
- metadata +5 -5
data/README.md
CHANGED
data/lib/foursquare/checkin.rb
CHANGED
@@ -8,6 +8,11 @@ module Foursquare
|
|
8
8
|
@json["id"]
|
9
9
|
end
|
10
10
|
|
11
|
+
def fetch
|
12
|
+
@json = @foursquare.get("checkins/#{id}")["checkin"]
|
13
|
+
self
|
14
|
+
end
|
15
|
+
|
11
16
|
def shout
|
12
17
|
@json["shout"]
|
13
18
|
end
|
@@ -25,6 +30,8 @@ module Foursquare
|
|
25
30
|
end
|
26
31
|
|
27
32
|
def user(full=false)
|
33
|
+
fetch unless @json["user"]
|
34
|
+
|
28
35
|
if full
|
29
36
|
@foursquare.users.find(@json["user"]["id"])
|
30
37
|
else
|
@@ -7,5 +7,17 @@ module Foursquare
|
|
7
7
|
def find(id)
|
8
8
|
Foursquare::Checkin.new(@foursquare, @foursquare.get("checkins/#{id}")["checkin"])
|
9
9
|
end
|
10
|
+
|
11
|
+
def recent(options={})
|
12
|
+
@foursquare.get("checkins/recent", options)["recent"].map do |json|
|
13
|
+
Foursquare::Checkin.new(@foursquare, json)
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
def all(options={})
|
18
|
+
@foursquare.get("users/self/checkins", options)["checkins"]["items"].map do |json|
|
19
|
+
Foursquare::Checkin.new(@foursquare, json)
|
20
|
+
end
|
21
|
+
end
|
10
22
|
end
|
11
23
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: john-mayer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
5
|
-
prerelease:
|
4
|
+
hash: 25
|
5
|
+
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 3
|
10
|
+
version: 0.0.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Pat Nakajima
|
@@ -96,7 +96,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
96
96
|
requirements: []
|
97
97
|
|
98
98
|
rubyforge_project:
|
99
|
-
rubygems_version: 1.
|
99
|
+
rubygems_version: 1.4.1
|
100
100
|
signing_key:
|
101
101
|
specification_version: 3
|
102
102
|
summary: A Foursquare API wrapper
|