Sha256: ffa6fd34fafb1e6e9f83aadf8ba7c51584068b75aff3c353929170146f4b36a5

Contents?: true

Size: 931 Bytes

Versions: 1

Compression:

Stored size: 931 Bytes

Contents

module Youku
  class Client
    BASE_URI = 'https://openapi.youku.com'

    attr_reader :client_id, :client_secret

    # Public: Constructor.
    #
    # client_id     - The String Youku client ID.
    # client_secret - The String Youku secret key.
    def initialize(client_id: nil, client_secret: nil)
      @client_id     = client_id
      @client_secret = client_secret
    end

    # Public: Get searches API.
    #
    # Returns the instance of Youku::V2::Searches.
    def searches
      Youku::V2::Searches.new(self)
    end

    # Public: Get videos API.
    #
    # Returns the instance of Youku::V2::Videos.
    def videos
      Youku::V2::Videos.new(self)
    end

    # Public: Get users API.
    #
    # Returns the instance of Youku::V2::Users.
    def users
      Youku::V2::Users.new(self)
    end

  end
end

require 'youku/v2/base'
require 'youku/v2/searches'
require 'youku/v2/users'
require 'youku/v2/videos'

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
youku_client-0.0.1 lib/youku/client.rb