Sha256: 5d09c4a767e451b73146b4da5a5997939edc3dfedc8ddbd68ac033d2b4d62dd7

Contents?: true

Size: 1.29 KB

Versions: 6

Compression:

Stored size: 1.29 KB

Contents

module Assistly
  class Client
    # Defines methods related to users
    module User
      # Returns extended information of a given user
      #
      # @overload user(user, options={})
      #   @param user [Integer] An Assitely user ID
      #   @option options [Boolean, String, Integer] :include_entities Include {http://dev.twitter.com/pages/tweet_entities Tweet Entities} when set to true, 't' or 1.
      #   @return [Hashie::Mash] The requested user.
      #   @example Return extended information for 12345
      #     Assistly.user(12345)
      # @format :json, :xml
      # @authenticated true
      # @see http://dev.assistly.com/docs/api/users/show
      def user(id,*args)
        options = args.last.is_a?(Hash) ? args.pop : {}
        response = get("users/#{id}",options)
        response.user
      end

      # Returns extended information for up to 100 users
      #
      # @format :json, :xml
      # @authenticated true
      # @rate_limited true
      # @return [Array] The requested users.
      # @see http://dev.assistly.com/docs/api/users
      # @example Return extended information account users
      #   Assistly.users
      def users(*args)
        options = args.last.is_a?(Hash) ? args.pop : {}
        response = get('users', options)
        response
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
assistly-0.2.6 lib/assistly/client/user.rb
assistly-0.2.5 lib/assistly/client/user.rb
assistly-0.2.4 lib/assistly/client/user.rb
assistly-0.2.3 lib/assistly/client/user.rb
assistly-0.2.2 lib/assistly/client/user.rb
assistly-0.2.1 lib/assistly/client/user.rb