john-mayer 0.1.1 → 0.1.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.
Files changed (2) hide show
  1. data/lib/foursquare/settings.rb +31 -0
  2. metadata +4 -3
@@ -0,0 +1,31 @@
1
+ module Foursquare
2
+ class Settings
3
+ def initialize(foursquare, json={})
4
+ @foursquare, @json = foursquare, json
5
+ end
6
+
7
+ def fetch
8
+ @json = @foursquare.get('settings/all')["settings"]
9
+ end
10
+
11
+ def receive_pings?
12
+ fetch unless @json.has_key?('receivePings')
13
+ @json['receivePings']
14
+ end
15
+
16
+ def receive_comment_pings?
17
+ fetch unless @json.has_key?('receiveCommentPings')
18
+ @json['receiveCommentPings']
19
+ end
20
+
21
+ def send_to_twitter?
22
+ fetch unless @json.has_key?('sendToTwitter')
23
+ @json['sendToTwitter']
24
+ end
25
+
26
+ def send_to_facebook?
27
+ fetch unless @json.has_key?('sendToFacebook')
28
+ @json['sendToFacebook']
29
+ end
30
+ end
31
+ 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: 25
4
+ hash: 31
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 1
10
- version: 0.1.1
9
+ - 2
10
+ version: 0.1.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Pat Nakajima
@@ -58,6 +58,7 @@ files:
58
58
  - README.md
59
59
  - lib/foursquare.rb
60
60
  - lib/foursquare/base.rb
61
+ - lib/foursquare/settings.rb
61
62
  - lib/foursquare/checkin.rb
62
63
  - lib/foursquare/checkin_proxy.rb
63
64
  - lib/foursquare/user.rb