module Thinkific

Thinkific::Bundle bundle = Thinkific::Bundle.get( 'id' ) bundle.courses chapter = Thinkific::Chapter.get 'id' chapter.contents

category = Thinkific::Category.get 'id' categories = Thinkific::Category.all products = category.products products.delete

new_product = Thinkific::Product.create( :name => 'prod name' ) categories.add_product( new_product )

new_category = Thinkfic::Category.create :name => 'cat name', :description => 'cat descr', :slug => 'cat slug' new_category.update( :description => 'cat descr 2' ) new_category.delete

content = Thinkific::Content.get 'id'

coupons = Thinkific::Coupon.all coupon = Thinkific::Coupon.get 'id' new_coupon = Thinkific::Coupon.create :code => '123', :note => 'c note', :quantity => 5

users = Thinkific::User.all user = Thinkific::User.get 'id' new_user = Thinkific::User.create :first_name => 'Adam', :last_name => 'Smith' new_user.update :last_name => 'Jackson' new_user.delete

Constants

DOMAIN

Public Class Methods

headers() click to toggle source
# File lib/thinkific.rb, line 36
def self.headers
  return {
      'Content-Type' => 'application/json',
    'X-Auth-Subdomain' => ::THINKIFIC_SUBDOMAIN,
    'X-Auth-API-Key' => ::THINKIFIC_KEY
  }
end
query() click to toggle source
# File lib/thinkific.rb, line 44
def self.query
      return { :limit => 10000 }
end