skittles 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -24,11 +24,13 @@ module Skittles
24
24
  # Get details of a checkin.
25
25
  #
26
26
  # @param id [String] The ID of the checkin to retrieve additional information for.
27
+ # @param options [Hash] A customizable set of options.
28
+ # @option options [String] signature When checkins are sent to public feeds such as Twitter, foursquare appends a signature (s=XXXXXX) allowing users to bypass the friends-only access check on checkins. The same value can be used here for programmatic access to otherwise inaccessible checkins.
27
29
  # @return [Hashie::Mash] A complete checkin object.
28
30
  # @requires_acting_user Yes
29
31
  # @see http://developer.foursquare.com/docs/checkins/checkins.html
30
- def checkin(id)
31
- get("checkins/#{id}").checkin
32
+ def checkin(id, options = {})
33
+ get("checkins/#{id}", options).checkin
32
34
  end
33
35
 
34
36
  # Comment on a check-in.
@@ -115,6 +115,21 @@ module Skittles
115
115
  }.merge(options))
116
116
  nil
117
117
  end
118
+
119
+ # Returns a list of venues near the current location with the most people
120
+ # currently checked in.
121
+ #
122
+ # @note This is an experimental API.
123
+ # @param ll [String] Latitude and longitude of the user's location.
124
+ # @param options [Hash] A customizable set of options.
125
+ # @option options [Integer] limit Number of results to return, up to 50.
126
+ # @option options [Integer] radius Radius in meters, up to approximately 2000 meters.
127
+ # @return An array of venues that are currently trending, with their hereNow populated.
128
+ # @requires_acting_user No
129
+ # @see http://developer.foursquare.com/docs/venues/trending.html
130
+ def trending(ll, options = {})
131
+ get('venues/trending', { :ll => ll }.merge(options))
132
+ end
118
133
 
119
134
  # Gives details about a venue, including location, mayorship, tags, tips,
120
135
  # specials and category.
@@ -38,7 +38,7 @@ module Skittles
38
38
 
39
39
  begin
40
40
  response = connection.request(method, paramify(path, options), headers)
41
- rescue OAuth2::AccessDenied || OAuth2::HTTPError => e
41
+ rescue OAuth2::ErrorWithResponse => e
42
42
  Skittles::Utils.handle_foursquare_error(e.response)
43
43
  else
44
44
  Skittles::Error
@@ -1,3 +1,3 @@
1
1
  module Skittles
2
- VERSION = '0.2.0'
2
+ VERSION = '0.3.0'
3
3
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: skittles
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.2.0
5
+ version: 0.3.0
6
6
  platform: ruby
7
7
  authors:
8
8
  - Anthony Smith
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-03-03 00:00:00 -05:00
13
+ date: 2011-03-08 00:00:00 -05:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
@@ -101,94 +101,6 @@ dependencies:
101
101
  type: :development
102
102
  prerelease: false
103
103
  version_requirements: *id008
104
- - !ruby/object:Gem::Dependency
105
- name: oauth2
106
- requirement: &id009 !ruby/object:Gem::Requirement
107
- none: false
108
- requirements:
109
- - - ~>
110
- - !ruby/object:Gem::Version
111
- version: 0.1.1
112
- type: :runtime
113
- prerelease: false
114
- version_requirements: *id009
115
- - !ruby/object:Gem::Dependency
116
- name: yajl-ruby
117
- requirement: &id010 !ruby/object:Gem::Requirement
118
- none: false
119
- requirements:
120
- - - ~>
121
- - !ruby/object:Gem::Version
122
- version: 0.8.1
123
- type: :runtime
124
- prerelease: false
125
- version_requirements: *id010
126
- - !ruby/object:Gem::Dependency
127
- name: hashie
128
- requirement: &id011 !ruby/object:Gem::Requirement
129
- none: false
130
- requirements:
131
- - - ~>
132
- - !ruby/object:Gem::Version
133
- version: 1.0.0
134
- type: :runtime
135
- prerelease: false
136
- version_requirements: *id011
137
- - !ruby/object:Gem::Dependency
138
- name: rspec
139
- requirement: &id012 !ruby/object:Gem::Requirement
140
- none: false
141
- requirements:
142
- - - ~>
143
- - !ruby/object:Gem::Version
144
- version: 2.5.0
145
- type: :development
146
- prerelease: false
147
- version_requirements: *id012
148
- - !ruby/object:Gem::Dependency
149
- name: bundler
150
- requirement: &id013 !ruby/object:Gem::Requirement
151
- none: false
152
- requirements:
153
- - - ~>
154
- - !ruby/object:Gem::Version
155
- version: 1.0.10
156
- type: :development
157
- prerelease: false
158
- version_requirements: *id013
159
- - !ruby/object:Gem::Dependency
160
- name: jeweler
161
- requirement: &id014 !ruby/object:Gem::Requirement
162
- none: false
163
- requirements:
164
- - - ~>
165
- - !ruby/object:Gem::Version
166
- version: 1.5.2
167
- type: :development
168
- prerelease: false
169
- version_requirements: *id014
170
- - !ruby/object:Gem::Dependency
171
- name: rcov
172
- requirement: &id015 !ruby/object:Gem::Requirement
173
- none: false
174
- requirements:
175
- - - ">="
176
- - !ruby/object:Gem::Version
177
- version: "0"
178
- type: :development
179
- prerelease: false
180
- version_requirements: *id015
181
- - !ruby/object:Gem::Dependency
182
- name: yard
183
- requirement: &id016 !ruby/object:Gem::Requirement
184
- none: false
185
- requirements:
186
- - - ~>
187
- - !ruby/object:Gem::Version
188
- version: 0.6.4
189
- type: :development
190
- prerelease: false
191
- version_requirements: *id016
192
104
  description: Foursquare v2 REST API client library for Ruby
193
105
  email: anthony@sticksnleaves.com
194
106
  executables: []
@@ -233,7 +145,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
233
145
  requirements:
234
146
  - - ">="
235
147
  - !ruby/object:Gem::Version
236
- hash: -3126880121428763984
148
+ hash: -1648337880465772768
237
149
  segments:
238
150
  - 0
239
151
  version: "0"