Lessonly Api Ruby Client

Ruby client for Lesson.ly API.

Installation

Add the following line to your application's Gemfile

gem 'lessonly-api'

And then run bundle install.

Usage

First, configure your client:

require 'lessonly'

LessonlyApi.configure do |config|
  config.root_url = 'https://api.lesson.ly/api/v1'
  config.api_key = `LESSONLY API KEY`
  config.domain = `LESSONLY SUBDOMAIN`
end

This is best done in an application initializer inside config/initializers.

From here, you can interact with the Lessonly API resources however you wish:

Users

all_users = LessonlyApi::Users.list

skylar = LessonlyApi::Users.show(user_id)
skylar.name # "John Doe"
skylar.email # "[email protected]"

frank = LessonlyApi::User.create({ name: 'Frank Macreery', email: '[email protected]', role: 'learner' })
frank.name # "Frank Macreery"

MIT License, see LICENSE for details.