Sha256: 67767ebdd7d7686bc8722901da70c2e6a3740c67f417f15bf353f2a4a83ce0e1
Contents?: true
Size: 647 Bytes
Versions: 1
Compression:
Stored size: 647 Bytes
Contents
require 'sinatra' 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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
liftapp-client-0.0.2 | examples/csv_export/app.rb |