Jake.codes

Emerald Siren, an API for Starbucks

Thursday, September 27, 2012

The Emerald Siren is an extremely simple Ruby script that logs in and scrapes your Starbucks account for how many stars and rewards you have. It also returns the balance and transaction history for your main card. It scrapes the page using Mechanize and grabs the data using regular expressions.

In simple: it’s an easily broken read-only API for your Starbucks card.

Let’s Be Clear

How To Use This

Try it out at emeraldsiren.com or clone this repo. You can use Emerald Siren as an API to get a JSON output of your balance, stars, and recent transactions.

The API call is simply http://emeraldsiren.com/USERNAME/PASSWORD Just remember to replace username and password with your log in details.

Adding /stars /rewards /balance /last and /glance to the end of the API call simply returns a number, amount, date or a string.

Panic’s Status Board

You can add this to Panic’s Status Board for iPad as a graph panel by using the url http://emeraldsiren.com/USERNAME/PASSWORD/graph

Things That Use This

Hypothetical Uses

About the “Developer”

Any questions and requests can be send to my email siren@jakebilbrey.com. Feel free to take this and modify it to do whatever you want. Any improvements I would love to see added to this project.