Sha256: 82f6f5d18197c88c0e9b666199425e79099760289c64cc7328ec39fe65ffc045

Contents?: true

Size: 1011 Bytes

Versions: 1

Compression:

Stored size: 1011 Bytes

Contents

require "panoptes/concerns/common_client"
require "panoptes/client/discussions"

module Panoptes
  class TalkClient
    include Panoptes::CommonClient
    include Panoptes::Client::Discussions

    # @param auth [Hash] Authentication details
    #   * either nothing,
    #   * a hash with +:token+ (an existing OAuth user token),
    #   * or a hash with +:client_id+ and +:client_secret+ (a keypair for an OAuth Application).
    # A client is the main interface to the talk v2 API.
    # @param url [String] Optional override for the API location to use. Defaults to the official talk api production environment.
    # @param auth_url [String] Optional override for the auth API location to use. Defaults to the official api production environment.
    def initialize(auth: {}, url: PROD_TALK_API_URL, auth_url: PROD_API_URL)
      super(auth: auth, url: url, auth_url: auth_url)
    end

    def get(path, query = {})
      response = conn.get(path, query)
      handle_response(response)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
panoptes-client-0.2.7 lib/panoptes/talk_client.rb