Sha256: e8ae13eb557abae97db93b94858e28e684945daa65acb2bc6e74251511a8289d

Contents?: true

Size: 444 Bytes

Versions: 1

Compression:

Stored size: 444 Bytes

Contents

require 'sinatra/base'

class FlickrFakr < Sinatra::Base
  get '/' do
    'Welcome to Flickr Fakr!'
  end

  get '/services/auth/' do
    redirect 'http://localhost:9292/flickr/callback?frob=123'
  end

  post '/services/rest/' do
    args = {}
    request.body.rewind
    request.body.read.split('&').each { |arg| args[arg.split('=').first] = arg.split('=').last }
    view = "#{args['method']}.#{args['format']}"
    erb view.to_sym
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
flickr_fakr-0.1.2 lib/flickr_fakr/flickr_fakr.rb