Skip to content

TalkativeTree/activitiesapi

Repository files navigation

Requirements List

  • activity = Activity.create title: "surfing", vendor: "honey badger surf co"

Ability to

  • CRUD Activities.
  • Activities can have defined capacity.
  • Activities can have unique prices.
  • Check Activity availability over a range, ie, starting 10/1 to 10/5, how many times is surfing offered?
  • Check Activity avail within a day, ie, on the 15th, how many cooking events offered?
  • Create Booking against activity.
  • Bookings should not be deleteable by api.
  • Activities have recurrence.

API Strategy

  • using rabl and rails-api to create a lightweight api

Config Steps

  bundle install
  rake db:create
  rake parallel:create
  rake parallel:prepare

Running the test suite

  • json endpoints are all accessible from a browser.
  zeus start
  bundle exec guard

not necessary to init app, background on guard/zeus setup

Areas to Improve

  • Recurrence's don't absorb the model Activity object into the recurrence series.
  • Lots of functionality could be built tied to managing how activities get added, removed or manipulated that are part of a Recurrence.

todo

  • allow for recurrence params to be sent to activity create, if they are present, trigger a recurrence object
  • add a current seats attribute to activity, maybe change capacity to 'total_capacity'
  • add a before save that calculates seats avail

About

honey badger likes to surf!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages