This is a basic gem to interact with the Edools API.
Add this line to your application's Gemfile:
gem 'edools'
And then execute:
$ bundle
Or install it yourself as:
$ gem install edools
In order to work properly the gem needs an API Token, you could either set it manually:
Edools.api_token = 'YOUR_API_TOKEN'
or let the gem automatically load it from the environment. Just make sure you've set the variable correctly:
ENV['EDOOLS_API_TOKEN'] = 'YOUR_API_TOKEN'
Edools::School.create(name: 'My School', email: '[email protected]', password: '******')
Edools::School.update(id: 1, name: 'Other School')
Edools::Course.create(name: 'My Course')
Edools::Course.all
Edools::SchoolProduct.create(school_id: 1, title: 'My Product')
Edools::SchoolProduct.all
Edools::Invitation.create(first_name: 'Student', email: '[email protected]', password: '******', password_confirmation: '******')
Edools::User.all(type: 'student')
Edools::User.all(type: 'student', school_product_id: 1)
Edools::User.create_from_csv(media.s3_file_content)
session = Edools::Session.create(email: '[email protected]', password: '******')
session.set_as_global_environment # Sets the current_token to the session's credentials
media = Edools::Media.find(1)
media.s3_file_content # Fetches s3_file contents
Bug reports and pull requests are welcome. 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.