Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/carlo-colombo/angular-foursquare
foursquare module for angular
https://github.com/carlo-colombo/angular-foursquare
Last synced: 8 days ago
JSON representation
foursquare module for angular
- Host: GitHub
- URL: https://github.com/carlo-colombo/angular-foursquare
- Owner: carlo-colombo
- Created: 2013-05-02T20:11:58.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2013-06-23T11:48:20.000Z (over 11 years ago)
- Last Synced: 2024-10-09T15:26:29.845Z (about 1 month ago)
- Language: JavaScript
- Size: 158 KB
- Stars: 26
- Watchers: 6
- Forks: 10
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
angular-foursquare
==================
foursquare module for angular
###Configuration
Load `ngFoursquare` module in your appInitialize `FoursquareProvider` token with the oauth token from [Foursquare](https://developer.foursquare.com/overview/auth.html)
```javascript
myapp.config(function(FoursquareProvider){
FoursquareProvider.token = foursquare_oauth_token
})
```
###Use
angular-foursquare expose a Foursquare instance with rest resource (ngResource) `Users`, `Checkins` and `Venues`
```javascript
$scope.user = Foursquare.Users.get({
userId: 'self'
})
```
an helper method is exposed to search venues using a `Geoposition` object as argument (accepting also a promise of a `Geoposition`)
```javascript
navigator.geolocation.getCurrentPosition(function (pos) {
$scope.$apply(function () {
$scope.venues = Foursquare.search(pos)
})
})
```###Available methods
- Users#get
- Users#lists
- Venues#search
- Venues#get
- Checkins#add
- Checkins#get
- Lists#add
- Lists#get
- searchTest application
================
http://carlo-colombo.github.io/angular-foursquare/test-app/index.html