This repo is no longer maintained by Clever. We provide the Swagger definitions at https://github.com/Clever/swagger-api.
Clever - the Ruby gem for the Clever API
The Clever API
This SDK is automatically generated by the Swagger Codegen project:
- API version: 2.0.0
- Package version: 2.0.1
- Build package: io.swagger.codegen.languages.RubyClientCodegen
To build the Ruby code into a gem:
gem build clever-ruby.gemspec
Then either install the gem locally:
gem install ./clever-ruby-2.0.1.gem
(for development, run gem install --dev ./clever-ruby-2.0.1.gem
to install the development dependencies)
or publish the gem to a gem hosting service, e.g. RubyGems.
Finally add this to the Gemfile:
gem 'clever-ruby', '~> 2.0.1'
If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:
gem 'clever-ruby', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'
Include the Ruby code directly using -I
as follows:
ruby -Ilib script.rb
Please follow the installation procedure and then run the following code:
# Load the gem
require 'clever-ruby'
# Setup authorization
Clever.configure do |config|
# Configure OAuth2 access token for authorization: oauth
config.access_token = 'YOUR ACCESS TOKEN'
end
api_instance = Clever::DataApi.new
id = "id_example" # String |
begin
result = api_instance.get_contact(id)
p result
rescue Clever::ApiError => e
puts "Exception when calling DataApi->get_contact: #{e}"
end
All URIs are relative to https://api.clever.com/v2.0
Class | Method | HTTP request | Description |
---|---|---|---|
Clever::DataApi | get_contact | GET /contacts/{id} | |
Clever::DataApi | get_contacts | GET /contacts | |
Clever::DataApi | get_contacts_for_student | GET /students/{id}/contacts | |
Clever::DataApi | get_course | GET /courses/{id} | |
Clever::DataApi | get_course_for_section | GET /sections/{id}/course | |
Clever::DataApi | get_courses | GET /courses | |
Clever::DataApi | get_district | GET /districts/{id} | |
Clever::DataApi | get_district_admin | GET /district_admins/{id} | |
Clever::DataApi | get_district_admins | GET /district_admins | |
Clever::DataApi | get_district_for_contact | GET /contacts/{id}/district | |
Clever::DataApi | get_district_for_course | GET /courses/{id}/district | |
Clever::DataApi | get_district_for_district_admin | GET /district_admins/{id}/district | |
Clever::DataApi | get_district_for_school | GET /schools/{id}/district | |
Clever::DataApi | get_district_for_school_admin | GET /school_admins/{id}/district | |
Clever::DataApi | get_district_for_section | GET /sections/{id}/district | |
Clever::DataApi | get_district_for_student | GET /students/{id}/district | |
Clever::DataApi | get_district_for_teacher | GET /teachers/{id}/district | |
Clever::DataApi | get_district_for_term | GET /terms/{id}/district | |
Clever::DataApi | get_districts | GET /districts | |
Clever::DataApi | get_school | GET /schools/{id} | |
Clever::DataApi | get_school_admin | GET /school_admins/{id} | |
Clever::DataApi | get_school_admins | GET /school_admins | |
Clever::DataApi | get_school_for_section | GET /sections/{id}/school | |
Clever::DataApi | get_school_for_student | GET /students/{id}/school | |
Clever::DataApi | get_school_for_teacher | GET /teachers/{id}/school | |
Clever::DataApi | get_schools | GET /schools | |
Clever::DataApi | get_schools_for_school_admin | GET /school_admins/{id}/schools | |
Clever::DataApi | get_schools_for_student | GET /students/{id}/schools | |
Clever::DataApi | get_schools_for_teacher | GET /teachers/{id}/schools | |
Clever::DataApi | get_section | GET /sections/{id} | |
Clever::DataApi | get_sections | GET /sections | |
Clever::DataApi | get_sections_for_course | GET /courses/{id}/sections | |
Clever::DataApi | get_sections_for_school | GET /schools/{id}/sections | |
Clever::DataApi | get_sections_for_student | GET /students/{id}/sections | |
Clever::DataApi | get_sections_for_teacher | GET /teachers/{id}/sections | |
Clever::DataApi | get_sections_for_term | GET /terms/{id}/sections | |
Clever::DataApi | get_student | GET /students/{id} | |
Clever::DataApi | get_students | GET /students | |
Clever::DataApi | get_students_for_contact | GET /contacts/{id}/students | |
Clever::DataApi | get_students_for_school | GET /schools/{id}/students | |
Clever::DataApi | get_students_for_section | GET /sections/{id}/students | |
Clever::DataApi | get_students_for_teacher | GET /teachers/{id}/students | |
Clever::DataApi | get_teacher | GET /teachers/{id} | |
Clever::DataApi | get_teacher_for_section | GET /sections/{id}/teacher | |
Clever::DataApi | get_teachers | GET /teachers | |
Clever::DataApi | get_teachers_for_school | GET /schools/{id}/teachers | |
Clever::DataApi | get_teachers_for_section | GET /sections/{id}/teachers | |
Clever::DataApi | get_teachers_for_student | GET /students/{id}/teachers | |
Clever::DataApi | get_term | GET /terms/{id} | |
Clever::DataApi | get_term_for_section | GET /sections/{id}/term | |
Clever::DataApi | get_terms | GET /terms | |
Clever::EventsApi | get_event | GET /events/{id} | |
Clever::EventsApi | get_events | GET /events |
- Clever::BadRequest
- Clever::Contact
- Clever::ContactObject
- Clever::ContactResponse
- Clever::ContactsResponse
- Clever::Course
- Clever::CourseObject
- Clever::CourseResponse
- Clever::CoursesResponse
- Clever::Credentials
- Clever::District
- Clever::DistrictAdmin
- Clever::DistrictAdminObject
- Clever::DistrictAdminResponse
- Clever::DistrictAdminsResponse
- Clever::DistrictObject
- Clever::DistrictResponse
- Clever::DistrictsResponse
- Clever::Event
- Clever::EventResponse
- Clever::EventsResponse
- Clever::InternalError
- Clever::Location
- Clever::Name
- Clever::NotFound
- Clever::Principal
- Clever::School
- Clever::SchoolAdmin
- Clever::SchoolAdminObject
- Clever::SchoolAdminResponse
- Clever::SchoolAdminsResponse
- Clever::SchoolObject
- Clever::SchoolResponse
- Clever::SchoolsResponse
- Clever::Section
- Clever::SectionObject
- Clever::SectionResponse
- Clever::SectionsResponse
- Clever::Student
- Clever::StudentObject
- Clever::StudentResponse
- Clever::StudentsResponse
- Clever::Teacher
- Clever::TeacherObject
- Clever::TeacherResponse
- Clever::TeachersResponse
- Clever::Term
- Clever::TermObject
- Clever::TermResponse
- Clever::TermsResponse
- Clever::ContactsCreated
- Clever::ContactsDeleted
- Clever::ContactsUpdated
- Clever::CoursesCreated
- Clever::CoursesDeleted
- Clever::CoursesUpdated
- Clever::DistrictadminsCreated
- Clever::DistrictadminsDeleted
- Clever::DistrictadminsUpdated
- Clever::DistrictsCreated
- Clever::DistrictsDeleted
- Clever::DistrictsUpdated
- Clever::SchooladminsCreated
- Clever::SchooladminsDeleted
- Clever::SchooladminsUpdated
- Clever::SchoolsCreated
- Clever::SchoolsDeleted
- Clever::SchoolsUpdated
- Clever::SectionsCreated
- Clever::SectionsDeleted
- Clever::SectionsUpdated
- Clever::StudentsCreated
- Clever::StudentsDeleted
- Clever::StudentsUpdated
- Clever::TeachersCreated
- Clever::TeachersDeleted
- Clever::TeachersUpdated
- Clever::TermsCreated
- Clever::TermsDeleted
- Clever::TermsUpdated
- Type: OAuth
- Flow: accessCode
- Authorization URL: https://clever.com/oauth/authorize
- Scopes: N/A
The current client support v2.0 of the API. For v1.2 please use:
- https://rubygems.org/gems/clever-ruby/versions/1.2.4
- https://github.com/Clever/clever-ruby/tree/v1.2.4
-
Git clone swagger-codegen (https://github.com/swagger-api/swagger-codegen)
-
Git clone Clever's swagger-api repo (https://github.com/Clever/swagger-api)
-
Run this command in the swagger-codegen repo
java -jar modules/swagger-codegen-cli/target/swagger-codegen-cli.jar generate -i $PATH_TO_SWAGGER_API_REPO/v2.0-client.yml -l ruby -o $PATH_TO_THIS_REPO --additional-properties gemVersion=$VERSION
- Run
make build
to copy over the override files
Signup to rubygems.org if you don't already have an account, and ask one of the gem owners to add you as an owner. You'll be prompted to log in from the command line when you push the gem, if you aren't already logged in.
To add a new owner, you need to be an owner, then run this command: gem owner clever-ruby -a <emailaddress>
- Update
CHANGELOG.md
gem build clever-ruby.gemspec
gem push clever-ruby-X.Y.Z.gem