0.0
No commit activity in last 3 years
No release in over 3 years
Geoloqi adapter for Sinatra, quickly allows you to make applications
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

= 0.6.1
>= 0
= 1.7.10

Runtime

>= 0.9.39
>= 1.0
 Project Readme

Geoloqi plugin for Sinatra

Easy drop-in Sinatra plugin for Geoloqi. All you need to do is require it, configure the settings and you're ready to go with Geoloqi application development!

Installation

gem install sinatra-geoloqi

Usage

First, go to the Geoloqi Developers Site and create an application on the "Your Apps" page.

Then, you can use it like this. This is the standard way with classic mode:

require 'sinatra'
require 'sinatra/geoloqi'

set :geoloqi_client_id,     'YOUR_APP_ID_GOES_HERE'
set :geoloqi_client_secret, 'YOUR_APP_SECRET_GOES_HERE'
set :geoloqi_redirect_uri,  'http://127.0.0.1:4567'
set :session_secret,        'ENTER_RANDOM_TEXT_HERE'

before do
  require_geoloqi_login
end

get '/?' do
  username = geoloqi.get('account/username')[:username]
  "You have successfully logged in as #{username}!"
end

For "classy mode", don't forget to register the plugin explicitly:

register Sinatra::Geoloqi

Found a bug?

Let us know! Send a pull request or a patch. Questions? Ask! We're here to help. File issues, we'll respond to them!

Authors