API for "WearBucks (Pay for Starbucks)" Android application
WearBucks API is an open-source RESTful HTTP API for retrieving Starbucks user information. This is the API used by WearBucks (Pay for Starbucks) Android application on Google Play.
This API is based off Starbucks class by Neil.
Login information (username and password) is not stored and the API should only be used over SSL/TSL
POST
/accountPOST
/locations (In progress)Retrieves Starbucks.com account details (given correct credentials)
Name | Description | Details |
---|---|---|
username | Starbucks username or password | required |
password | Starbucks password | required |
Name | Description | Details |
---|---|---|
Content-Type | application/json | required |
cid | Client UUID | optional, used by Google Analytics |
av | App Version Number | optional, used by Google Analytics |
Example JSON Request body:
{
"username": "user@domain.com",
"password": "******"
}
Example JSON Response body:
{
"error": false,
"customer_name": "Firstname Lastname",
"stars": "0",
"rewards": "0",
"dollar_balance": "00.00",
}
The API will always return an HTTP status code 200 however there may be errors. In the JSON response body, "error" will not be false. Example:
{
"error":{
"code": 401,
"message": "Unauthorized",
"description": "Authentication credentials were malformed or incorrect."
}
}
400
Bad Request - Likely that the request was not formatted correctly401
Unauthorized - Likely that the credentials were incorrectNOTE: This API endpoint is in progress and therefore the documentation is not complete. Analytics is also currently not supported This feature returns a list of nearby Starbucks locations stored in a MongoDB database (not included in API). Set the following environment variables in index.php:
$_ENV['LOCATIONS'] = true;
$_ENV['MONGOHQ_URL'] = mongodb://user:pass@server.mongohq.com/db_name;
Google analytics can be enabled and is tracked using "Measurement Protocol". Ensure "Universal Analytics" is enabled on the property and use the provided tracking ID "UA-XXXX-XX".Set the following environment variables in index.php:
$_ENV['ANALYTICS'] = true;
$_ENV['TRACKING_ID'] = "UA-XXXXXXXX-X";