Skip to content

laurenfazah/color_swatch_api

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
app
 
 
bin
 
 
 
 
db
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published