Sha256: a6faf2cf24c114836eb118531686d11692873e2722bbe89df3ceba91921948ff

Contents?: true

Size: 775 Bytes

Versions: 1

Compression:

Stored size: 775 Bytes

Contents

require 'zalo_api/resource'

module ZaloAPI
  # API for Offical Account
  class OA < Resource
    # Get Offical Account profile
    def me
      @client.connection.get "#{base_url}/oa/getoa"
    end

    # Get a list of followers
    # @param [Integer] offset Start position in the list of people followers
    # @param [Integer] count Number of follower people want to take
    # @return [Hash] List user_id
    # {
    # "error": int,
    # "message": String,
    # "data": {
    #   "total": int,
    #   "followers": [
    #     {
    #       "user_id": String
    #     },...
    #   ]
    # }
    # }
    def followers(offset: 0, count: 5)
      @client.connection.get "#{base_url}/oa/getfollowers", { data: { offset: offset, count: count }.to_json }
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
zalo-api-0.1.0 lib/zalo_api/oa.rb