No description, website, or topics provided.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
app
bin
config
db
lib/tasks
public
spec
vendor
.gitignore
Gemfile
Gemfile.lock
README.md
Rakefile
config.ru

README.md

Color Swatch API

Color Swatch tracks frequently used colors. You can POST colors to the database, and GET the most frequently posted color.

Base URL: https://color-swatch-api.herokuapp.com/

Verb Path Body Response
GET /api/v1/top_color "{\"value\":\"tomato\", \"color_count\": 7}"
GET /api/v1/colors "[{\"value\":"tomato"},{\"value\":\"indigo\"}]"
POST /api/v1/colors { color: { value: "indigo" } } "{\"color\":{\"value\":\"indigo\"}}"

Setup

bundle install
bundle exec rake db:{create,migrate,seed}
bundle exec rspec
bundle exec rails s

Notes

The colors table is set to reset itself once exceeding 2000 entries. This may happen mid-development for you, so be wary.