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: 'my@school.com', password: '******')
Edools::School.update(id: 1, name: 'Other School')Edools::Course.create(name: 'My Course')
Edools::Course.allEdools::SchoolProduct.create(school_id: 1, title: 'My Product')
Edools::SchoolProduct.allEdools::Invitation.create(first_name: 'Student', email: 'email@student.com', 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@user.com', password: '******')
session.set_as_global_environment # Sets the current_token to the session's credentialsmedia = Edools::Media.find(1)
media.s3_file_content # Fetches s3_file contentsBug 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.