pco_api_oauth_example_sinatra_ruby

所属分类:Ruby编程
开发工具:Ruby
文件大小:0KB
下载次数:0
上传日期:2024-02-06 20:29:55
上 传 者sh-1993
说明:  Sinatra+Ruby应用程序示例,用于演示如何使用OAuth2访问规划中心的API
(Example Sinatra + Ruby app for demonstrating how to access Planning Center s API using OAuth2)

文件列表:
public/
views/
.ruby-version
Gemfile
Gemfile.lock
LICENSE
app.rb
config.ru

# PCO API OAuth Example - Sinatra + Ruby This is an example Sinatra app for demonstrating how one might build an app to authenticate any PCO user and then subsequently use that authentication to query the API using [pco_api](https://github.com/planningcenter/pco_api_ruby). You can learn more about Planning Center's API [here](https://developer.planning.center/docs). ## Setup 1. Create an app at [api.planningcenteronline.com](https://api.planningcenteronline.com/oauth/applications). Set the callback URL to be `http://localhost:4567/auth/complete`. 2. Install the required gems: ```bash bundle install ``` 3. Set your Application ID and Secret in the environment and run the app: ```bash export OAUTH_APP_ID=abcdef0123456789abcdef0123456789abcdef012345789abcdef0123456789a export OAUTH_SECRET=0123456789abcdef0123456789abcdef012345789abcdef0123456789abcdef0 export SESSION_SECRET=some-secret-phrase-for-session-cookie-encryption ruby app.rb ``` 4. Visit [localhost:4567](http://localhost:4567). ## Copyright & License Copyright Ministry Centered Technologies. Licensed MIT.

近期下载者

相关文件


收藏者