Sha256: 041bd505879f0cc1397b3b1eae522369f73aea4c2b7d7e6a6bb0219967318f4e
Contents?: true
Size: 645 Bytes
Versions: 2
Compression:
Stored size: 645 Bytes
Contents
require 'sinatra' require 'haml' require 'coffee-script' require 'liftapp-client' configure do mime_type :plain, 'text/plain' end get '/' do haml :index end post '/dashboard.json' do client = Liftapp::Client.new(params[:email], params[:password]) content_type :json client.dashboard.to_json end get '/checkins/:user/:habit' do content_type :plain client = Liftapp::Client.new(profile_hash: params[:user]) data = client.checkin_data(params[:habit]) output = data['checkins'].map { |d| d.strftime('%Y-%m-%d') } output.unshift data['habit-name'] output.join("\n") end get '/application.js' do coffee :application end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
liftapp-client-0.0.6 | examples/csv_export/app.rb |
liftapp-client-0.0.5 | examples/csv_export/app.rb |