easy_oauth
easy_oauth
The EasyOAuth shard builds and verifies OAuth headers for use with third party libraries such as Halite. This library is a port of laserlemon/simple_oauth.
Installation
Add this to your application's shard.yml
:
dependencies:
easy_oauth:
github: watzon/easy_oauth
Usage
require "halite" # or whatever you want
require "easy_oauth"
options = {
"consumer_key" => "8karQBlMg6gFOwcf8kcoYw",
"consumer_secret" => "3d0vcHyUiiqADpWxolW8nlDIpSWMlyK7YNgc5Qna2M",
"token" => "201425800-Sv4sTcgoffmHGkTCue0JnURT8vrm4DiFAkeFNDkh",
"token_secret" => "T5qa1tF57tfDzKmpM89DHsNuhgOY4NT6DlNLsTFcuQ"
}
url = https://api.twitter.com/1/statuses/update.json
params = {"status" => "hi, again"}
header = EasyOAuth::Header.new(:post, url, params, options)
response = halite.auth(header).post(url, params: params)
Development
- Make your changes
- Run
crystal spec
and make sure you didn't break anything - Follow the contributing instructions below
- Profit
Contributing
- Fork it ( https://github.com/watzon/easy_oauth/fork )
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -am 'Add some feature')
- Push to the branch (git push origin my-new-feature)
- Create a new Pull Request
Contributors
- watzon Chris Watson - creator, maintainer
Repository
easy_oauth
Owner
Statistic
- 3
- 0
- 0
- 0
- 3
- almost 7 years ago
- February 25, 2018
License
MIT License
Links
Synced at
Sat, 21 Dec 2024 23:15:31 GMT
Languages