You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 13, 2020. It is now read-only.
That's great! Let me know by filing an issue [on Github](https://github.com/ryanseys/node-jawbone-up/issues)
8
+
9
+
## I want to fix a bug!
10
+
11
+
Fork [the repo](https://github.com/ryanseys/node-jawbone-up), make your changes (preferably in a new branch), push them back to GitHub and send a pull request!
12
+
13
+
Check out how to [create a pull request](https://help.github.com/articles/creating-a-pull-request) for additional help.
14
+
15
+
## Additional Resources
16
+
17
+
[Jawbone Up Official API Documentation](https://jawbone.com/up/developer/)
Copy file name to clipboardExpand all lines: README.md
+86-97Lines changed: 86 additions & 97 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,9 +2,7 @@
2
2
3
3
Jawbone UP API Node.js Library
4
4
5
-
<b>
6
-
NOTE: The UP API was recently updated to version 1.1, although they will continue to support version 1.0. This library is currently operational under API version 1.0 however I plan to update it to 1.1 once exams at school pass. =)
7
-
</b>
5
+
API Version: v.1.1
8
6
9
7
If you would like to contribute to this project in any way, including to update it to support API v1.1, please send me a pull request!
10
8
@@ -25,10 +23,13 @@ See below for an example of how this could be done. This library does not
25
23
assist in getting an `access_token` through OAuth, but once you get the token,
26
24
it will apparently last for a **year**.
27
25
26
+
A `client_secret` attribute is required if you would like to use `up.refreshToken.get()` to get new refresh tokens. It is not required otherwise.
27
+
28
28
```javascript
29
29
var options = {
30
30
// ** REQUIRED **
31
-
access_token:'xyz'// Access token for specific user
31
+
access_token:'xyz'// Access token for specific user,
32
+
client_secret:'abc'// Client Secret (required for up.refreshToken.get())
32
33
}
33
34
34
35
var up =require('jawbone-up')(options);
@@ -38,25 +39,6 @@ var up = require('jawbone-up')(options);
38
39
39
40
Official UP API can be found at [jawbone.com/up/developer](https://jawbone.com/up/developer/)
40
41
41
-
Generated documentation for this library is hosted at [ryanseys.github.io/node-jawbone-up/docs](http://ryanseys.github.io/node-jawbone-up/docs/)
42
-
43
-
You can also generate the docs yourself:
44
-
45
-
```
46
-
npm install
47
-
node_modules/.bin/jsdoc . -d docs
48
-
```
49
-
50
-
Or see below for an overview...
51
-
52
-
The callback function will follow the format as specified below:
53
-
54
-
```javascript
55
-
functioncallback(err, body) {
56
-
// do stuff
57
-
}
58
-
```
59
-
60
42
Example callback:
61
43
62
44
```javascript
@@ -77,178 +59,199 @@ function callback(err, body) {
77
59
78
60
```javascript
79
61
// get user info
80
-
up.me.get({}, callback) // GET /nudge/api/v.1.0/users/@me
62
+
up.me.get({}, callback) // GET /nudge/api/v.1.1/users/@me/
81
63
82
64
// get friends of user
83
-
up.friends.get({}, callback) // GET /nudge/api/v.1.0/users/@me/friends
65
+
up.friends.get({}, callback) // GET /nudge/api/v.1.1/users/@me/friends
84
66
85
67
// get mood of user
86
-
up.mood.get({}, callback) // GET /nudge/api/v.1.0/users/@me/mood
68
+
up.mood.get({}, callback) // GET /nudge/api/v.1.1/users/@me/mood
87
69
88
70
// get trends of user
89
-
up.trends.get({}, callback) // GET /nudge/api/v.1.0/users/@me/trends
71
+
up.trends.get({}, callback) // GET /nudge/api/v.1.1/users/@me/trends
90
72
91
73
// get goals of user
92
-
up.goals.get({}, callback) // GET /nudge/api/v.1.0/users/@me/goals
74
+
up.goals.get({}, callback) // GET /nudge/api/v.1.1/users/@me/goals
@@ -269,20 +272,6 @@ Then you may run all the tests with:
269
272
npm test
270
273
```
271
274
272
-
# Contributing
273
-
274
-
I would love contributions. Filing issues [on Github](https://github.com/ryanseys/node-jawbone-up/issues)
275
-
or sending pull requests is always greatly appreciated.
276
-
277
275
# License
278
276
279
-
The MIT License (MIT)
280
-
281
-
Copyright (c) 2013 Ryan Seys
282
-
283
-
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
284
-
285
-
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
286
-
287
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
0 commit comments