node-entourage
Version:
Entourage API wrapper for Node.js
75 lines (59 loc) • 1.25 kB
Markdown
# node-entourage
Une API pour [Entourage www.entourage.social](http://www.entourage.social)
## Usage
```javascript
const Entourage = require('node-entourage');
const entourage = new Entourage({
apiKey: ''
});
```
### Authentification
```javascript
entourage.login(phoneNumber, code);
```
### Get feeds
```javascript
entourage.getFeeds(
{latitude, longitude},
distance = 10,
timeRange = 720,
before = moment().format('YYYY-MM-DD HH:mm:ss ZZ')
)
timeRange = {
720: 30 days,
24: 24 hours,
192: 8 days
}
```
### Get feeds by type
```javascript
entourage.getFeedsByType(
type,
{latitude, longitude},
distance = 10,
timeRange = 720,
before = moment().format('YYYY-MM-DD HH:mm:ss ZZ')
)
type = 'ask_for_help' | 'contribution'
```
### Send participation
```javascript
entourage.sendParticipation(entourageId, distance, message)
```
### Get Points of Interests
```javascript
entourage.getPOIS(
categoryIds = [1,2,3,4,5,6,7],
{latitude, longitude},
distance = 10
)
categoryId = {
1: Food = "Se nourrir",
2: Shelter = "Se loger",
3: Healing = "Se soigner",
4: Freshen up = "Se rafraichir",
5: Orientation = "S'orienter",
6: Toileting = "S'occuper de soi",
7: Reinsertion = "Se reinserer"
}
```