crystal-github alternatives and similar shards
Based on the "Third-party APIs" category.
Alternatively, view crystal-github alternatives based on common mentions on social networks and blogs.
-
discordcr
Minimalist Discord library for Crystal. (Still WIP, but usable) -
twitter-crystal
A library to access the Twitter API using Crystal -
TelegramBot
(deprecated) see https://github.com/protoncr/tourmaline instead -
crystal_slack
Parse Slack slash commands or send incoming web hooks from Crystal -
crystal-consul
Crystal client for Consul (http://www.consul.io/) -
mollie.cr
Mollie Payments API client for Crystal http://www.mollie.com -
open_exchange_rates
A library for Open Exchange Rates API -
aws-signer.cr
This library signs your HTTP requests using AWS v4 -
GDAX
๐ GDAX REST and WebSocket API wrapper to trade blockchain cryptocurrencies like bitcoin, Litecoin and Ethereum. -
web_finger
A WebFinger (https://tools.ietf.org/html/rfc7033) client for Crystal. -
soundcloud-crystal
A library to access the SoundCloud API using Crystal -
bugsnag.cr
bugsnag exception notifier written in crystal. Supports sidekiq.cr, kemal, HTTP::Server. -
host_meta
A Web Host Metadata (https://tools.ietf.org/html/rfc6415) client for Crystal. -
fantasy_football_nerd_api
Crystal library for Fantasy Football Nerd API -
crystal-connpass
:anchor: A Crystal wrapper for the Connpass API
Free Global Payroll designed for tech teams
Do you think we are missing an alternative of crystal-github or a related project?
README
crystal-github
Github API wrapper in Crystal! (work in progress)
Installation
Add this to your application's shard.yml
:
dependencies:
github:
github: felipeelias/crystal-github
version: ~> 0.1.0
Usage
On your application code, require it with:
require "github"
OAuth2 Flow
For now, this client only supports OAuth2 flow to make requests to Github API. To get this working, you need to register a new application
and setup the proper attributes.
oauth2 = Github::OAuth2.new(client_id, client_secret, redirect_uri)
With that, you can build the authorization_uri
and redirect your users to that
oauth2.authorize_uri
# => https://github.com/login/oauth/authorize...
If the user authorizes your application, you should be redirected back to the redirect_uri
that you set up previously, with a code
parameter in the URI
# if you're using kemal
code = env.params.query["code"]
token = oauth2.access_token(code)
# => OAuth2::AccessToken is returned
token.access_token
# => "53gdf31mnv..."
You can then use the access_token
to authorize users with other API requests.
Users API
NOTE: subject to change
api = Github::UserApi.new(token.access_token)
user = api.user
# => {"login" => ..., "avatar_url" => ...}
Development
Run tests with:
crystal spec
You can test it locally with other apps by adding it to your shards.yml
dependencies:
github:
path: path/to/crystal-github
Contributing
- Create an issue on Github first, describing the feature or fix you'd like to add.
- If nobody is working on the issue, feel free to fork and send a pull-request
Contributors
- felipeelias Felipe Philipp - creator, maintainer