Sha256: 7c3ad5b7e5668acebf9cd6ca44a4f9a75ad614efc3a9556f058b22a506b1fe75

Contents?: true

Size: 1.18 KB

Versions: 1

Compression:

Stored size: 1.18 KB

Contents

=begin
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[0].delete

new_product = Thinkific::Product.create( :name => 'prod name' )
categories[0].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
=end

module Thinkific
  DOMAIN = 'https://api.thinkific.com'

  HEADERS = {
  	'Content-Type' => 'application/json',
    'X-Auth-Subdomain' => THINKIFIC_SUBDOMAIN,
    'X-Auth-API-Key' => THINKIFIC_KEY
  }

end

require 'thinkific/course'
require 'thinkific/user'

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
thinkific-0.0.2 lib/thinkific.rb