Description
Simple API wrapper for Identitas API.
Installation
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
Usage
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.me
Endpoints
verify credential
Verify your credential
parameters :
name | type |
---|---|
access_token |
query string |
example :
response = request.verify_credential.parsed_response
me
Get detail information about user
parameters :
name | type |
---|---|
access_token |
query string |
example :
response = request.me.parsed_response
token status
Check token status
parameters :
name | type |
---|---|
access_token |
query string |
example :
response = request.token_status.parsed_response
Change password
Change 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_response
Create user
Create 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_response
Development
After 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
Contributing
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.
License
The gem is available as open source under the terms of the MIT License.
Code of Conduct
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.