Simple API wrapper for Identitas API.
Add this line to your application's Gemfile:
gem 'ruby-identitas-api'And then execute:
$ bundle
Or install it yourself as:
$ gem install ruby-identitas-api
Generate initializer :
$ rails g ruby_identitas_api:install
Customize base URI if needed
Access API
request = Ruby::Identitas::Main.new("YOUR_ACCESS_TOKEN")
response = request.meVerify your credential
parameters :
| name | type |
|---|---|
access_token |
query string |
example :
response = request.verify_credential.parsed_responseGet detail information about user
parameters :
| name | type |
|---|---|
access_token |
query string |
example :
response = request.me.parsed_responseCheck token status
parameters :
| name | type |
|---|---|
access_token |
query string |
example :
response = request.token_status.parsed_responseChange password
parameters :
| name | type |
|---|---|
access_token |
query string |
password |
query string |
password_confirmation |
query string |
example :
response = request.password({password: "mys3cret", password_confirmation: "mys3cret"}).parsed_responseCreate a new user
parameters :
| name | type |
|---|---|
access_token |
query string |
email |
query string |
first_name |
query string |
last_name |
query string |
password |
query string |
password_confirmation |
query string |
example :
response = request.create_user({email: "m.yunan.helmy@gmail.com", first_name: "Yunan", last_name: "Helmy", password: "mys3cret", password_confirmation: "mys3cret"}).parsed_responseAfter checking out the repo, run bin/setup to install dependencies. Then, run rake spec to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.
To install this gem onto your local machine, run bundle exec rake install. To release a new version, use gem release
Bug reports and pull requests are welcome on GitHub at https://github.com/extrainteger/ruby-identitas-api. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.
The gem is available as open source under the terms of the MIT License.
Everyone interacting in the Ruby::Identitas::Api project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.