Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Party Time API reimplemented with Weasel Diesel
Branch: master
Pull request Compare This branch is even with mikesea:master.
Failed to load latest commit information.
api removed hello world examples
bin establish activerecord connection on console startup
config move AR::connectionmanagement to middleware.rb and remove unused midd…
db/migrate add playlist_id to tracks table
doc added documentation
lib use self. on recommender module
models move recommender module to lib directory
public initial commit
test removed hello world examples
.gitignore updated .gitignore; remove Thorfile
Gemfile use database_cleaner and factory girl for tests
Gemfile.lock use database_cleaner and factory girl for tests
Guardfile
README.md note for example implementation
Rakefile simple rake tasks to migrate up and down
config.ru move AR::connectionmanagement to middleware.rb and remove unused midd…

README.md

Weasel Diesel Party Time!

This project is an (example) implementation of the Party Time API using @mattetti's Weasel Diesel web service DSL, and the Weasel Diesel Sinatra gem.

Usage

  1. First, clone the repo and bundle the app's dependencies:
$ git clone git://github.com/mikesea/partytime_wd.git
$ cd partytime_wd
$ bundle install
  1. Then, migrate the database (this will create a development.sqlite3 database in the db/ directory:
$ rake db:migrate RACK_ENV=development
  1. Now, start the server!
$ bundle exec rackup
  1. Or, boot up the console instead:
$ bundle exec bin/console

Endpoints

Available endpoints are limited to:

POST /playlists
GET /playlists/:id
POST /playlists/:playlist_id/tracks
DELETE /playlists/:playlist_id/tracks/:id

Documentation

Documentation for the API is found under the doc/ directory. Open doc/index.html in your browser to navigate the docs. These docs are generated automatically by Weasel Diesel, so feel free to remove that directory and generate the documentation again with the following rake task:

rake doc:services

Tests

To run the test, migrate the test database:

$ rake db:migrate RACK_ENV=test

Then, run the specs!

$ rake test
Something went wrong with that request. Please try again.