https://github.com/konsumer/humblebundle
Simple nodejs API for Humble Bundle purchases
https://github.com/konsumer/humblebundle
Last synced: over 1 year ago
JSON representation
Simple nodejs API for Humble Bundle purchases
- Host: GitHub
- URL: https://github.com/konsumer/humblebundle
- Owner: konsumer
- Created: 2016-05-14T16:17:13.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2016-05-14T19:13:42.000Z (about 10 years ago)
- Last Synced: 2025-02-28T13:21:07.893Z (over 1 year ago)
- Language: JavaScript
- Size: 8.79 KB
- Stars: 7
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# humblebundle
A simple nodejs API for reading your Humble Bundle purchases.
[](http://standardjs.com/)
## usage
Install with `npm install humblebundle`.
Here is an example of getting some info:
```js
var humblebundle = require('humblebundle')
humblebundle.login(email, password)
.then(function(){
// get list of orders
return humblebundle.order()
})
.then(function(orders){
// get a single order by ID
return humblebundle.order(orders[0])
})
.then(function(order){
console.log(order)
})
.catch(function(err){
throw err
})
```
### tests
Run them tests with `npm test`. You will need to set these environment variables:
```
HUMBLE_EMAIL
HUMBLE_PASSWORD
```
## api
All of these return promises.
### `login(email, password)`
Authenticate yourslf with Humble Bundle. Used to get the cookies used in other API calls.
### `order([id])`
If you leave out `id`, you'll get a list of your orders. If you include it, you'll get details about the order.
### `claimed()`
Get list of all the claimed entities for a user. This takes a really long time (45 seconds on my connection.)