Sha256: 277d80adda8282f85f3a573e4ed5337b51eb9b4ce51a017276384b2e6c4f8097
Contents?: true
Size: 662 Bytes
Versions: 2
Compression:
Stored size: 662 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(email: params[:email], password: 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.4 | examples/csv_export/app.rb |
liftapp-client-0.0.3 | examples/csv_export/app.rb |