Sha256: acdcf126eb079f6c2cff4676b4ed58830e34b61e659c91e0a831c19984d61118

Contents?: true

Size: 965 Bytes

Versions: 1

Compression:

Stored size: 965 Bytes

Contents

require 'rest-client'
require 'api-auth'
require 'filum'

require "loquor/version"
require "loquor/configuration"
require "loquor/client"
require 'loquor/representation'

require 'loquor/api_call'
require "loquor/http_action"

module Loquor

  Representations = {
    "GroupDiscussion"     => "/group_discussions",
    "GroupDiscussionPost" => "/group_discussion_posts",
    "MediaFile"           => "/media_files",
    "Mnemonic"            => "/mnemonics",
    "PremiumTutorial"     => "/premium_tutorials",
    "Partner"             => "/partners",
    "SyllabusItem"        => "/syllabus_items",
    "User"                => "/users"
  }

  def self.config
    if block_given?
      yield loquor.config
    else
      loquor.config
    end
  end

  def self.get(url)
    loquor.get(url)
  end

  def self.post(url, payload)
    loquor.post(url, payload)
  end

  private

  def self.loquor
    @loquor ||= Client.new
  end
end

require 'loquor/representations'

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
loquor-0.1.1 lib/loquor.rb