john-mayer 0.0.1 → 0.0.2
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/lib/foursquare/checkin.rb +8 -0
- data/lib/foursquare/user.rb +20 -0
- data/test.rb +1 -1
- metadata +3 -3
data/lib/foursquare/checkin.rb
CHANGED
@@ -23,5 +23,13 @@ module Foursquare
|
|
23
23
|
def venue
|
24
24
|
Foursquare::Venue.new(@foursquare, @json["venue"])
|
25
25
|
end
|
26
|
+
|
27
|
+
def user(full=false)
|
28
|
+
if full
|
29
|
+
@foursquare.users.find(@json["user"]["id"])
|
30
|
+
else
|
31
|
+
Foursquare::User.new(@foursquare, @json["user"])
|
32
|
+
end
|
33
|
+
end
|
26
34
|
end
|
27
35
|
end
|
data/lib/foursquare/user.rb
CHANGED
@@ -44,6 +44,18 @@ module Foursquare
|
|
44
44
|
@json["contact"]
|
45
45
|
end
|
46
46
|
|
47
|
+
def email
|
48
|
+
contact["email"]
|
49
|
+
end
|
50
|
+
|
51
|
+
def twitter
|
52
|
+
contact["twitter"]
|
53
|
+
end
|
54
|
+
|
55
|
+
def phone_number
|
56
|
+
contact["phone"]
|
57
|
+
end
|
58
|
+
|
47
59
|
def badge_count
|
48
60
|
@json["badges"]["count"]
|
49
61
|
end
|
@@ -60,5 +72,13 @@ module Foursquare
|
|
60
72
|
item = @json["checkins"]["items"].last
|
61
73
|
Foursquare::Checkin.new(@foursquare, item)
|
62
74
|
end
|
75
|
+
|
76
|
+
def checkins_here
|
77
|
+
checkin_json = @foursquare.get("venues/#{last_checkin.venue.id}/herenow")
|
78
|
+
checkin_json["hereNow"]["items"].map do |json|
|
79
|
+
checkin = @foursquare.get("checkins/#{json["id"]}")["checkin"]
|
80
|
+
Foursquare::Checkin.new(@foursquare, checkin)
|
81
|
+
end
|
82
|
+
end
|
63
83
|
end
|
64
84
|
end
|
data/test.rb
CHANGED
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:
|
4
|
+
hash: 27
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 2
|
10
|
+
version: 0.0.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Pat Nakajima
|