forked from podio/podio_rails_sample
-
Notifications
You must be signed in to change notification settings - Fork 0
Sample Rails project with authentication and item read/create
Simbotix/podio_rails_sample
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
== Podio sample Rails application This app demonstrates how to authenticate against Podio, and how to read and write items. == Preparations on Podio Create an API key by logging into Podio and go to Account Settings in the My Account dropdown. Then go to the API Keys tab and write a name and a domain for this app. While you are developing, you probably want to set the domain to localhost:3000 or similar. To be able to run this sample you must also have the Leads app installed on Podio. It can be installed from the App Store: https://podio.com/store/app/1258-leads. You can also use another app, but then this example won't work "out of the box". == Configuration You must put your API key and secret in the environment variables PODIO_CLIENT_ID and PODIO_CLIENT_SECRET. Alternatively you can hardcode them in config/initializers/podio.rb. You must also update the hardcoded APP_ID and SPACE_ID constants in app/models/lead.rb to the corresponding ids for your instance of the Leads app. You find the app id by going to the Leads app on Podio and copying the last numerical part of the url. The space id cannot be taken directly from the url, but one way to get it is to evaluate Podio.Config.space_id in the javascript console when you are on the Leads app. == Tips You probably want to work with Podio apps that has a completely different structure than the Leads app used in this example. The easiest way to the see the structure and the all-important external ids of you app, is to go to https://developers.podio.com/doc/applications/get-app-22349 and enter the app id with "full" as type in the in the sandbox. You can also see exactly what fields and values you get from a Get Items call by using the sandbox here: https://developers.podio.com/doc/items/get-items-27803 The authentication in this app is based on Omniauth and a strategy for using Omnioauth with Podio - https://github.com/lucasallan/omniauth-podio. On top of that it pretty much follows the steps outlined in the RailsCast about simple Omniauth usage - http://railscasts.com/episodes/241-simple-omniauth?view=asciicast.
About
Sample Rails project with authentication and item read/create
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published