Sha256: 80247bd12ed019ac8b604ef516f53d281705987eef371eefd03ba57ba26531a4

Contents?: true

Size: 1.42 KB

Versions: 9

Compression:

Stored size: 1.42 KB

Contents

module AngellistApi
  class Client
    # Defines methods related to URLs
    module Users
      # Get a user's information given an id.
      # @requires_authentication No
      # @response_format `json`
      # @param id [Integer] :id id of the desired user.
      # @example Get a user's information given an id.
      #   AngellistApi.get_user
      def get_user(id)
        get("/users/#{id}", :format => :json, :phoenix => true)
      end
      
      # Search for a user given a URL slug. Responds like GET /users/:id.
      # @requires_authentication No
      # @response_format `json`
      # @param options [Hash] A customizable set of options.
      # @option options [String] :slug The URL slug of the desired user. 
      # @option options [String] :md5 An md5 hash of the email address of the desired user. 
      # @example Search for a user given a URL slug or md5 hash of an email address. Responds like GET /users/:id.
      #   AngellistApi.user_search
      def user_search(options={})
        get("/users/search", options, :format => :json, :phoenix => true)
      end
      
      # Get the current user's information. Responds like GET /users/:id.
      # @requires_authentication Yes
      # @response_format `json`
      # @example Get the current user's information. Responds like GET /users/:id.
      #   AngellistApi.user_search
      def me
        get("/me", :format => :json, :phoenix => true)
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
angellist_api-0.0.9 lib/angellist_api/client/users.rb
angellist_api-0.0.8 lib/angellist_api/client/users.rb
angellist_api-0.0.7 lib/angellist_api/client/users.rb
angellist_api-0.0.6 lib/angellist_api/client/users.rb
angellist_api-0.0.5 lib/angellist_api/client/users.rb
angellist_api-0.0.4 lib/angellist_api/client/users.rb
angellist_api-0.0.3 lib/angellist_api/client/users.rb
angellist_api-0.0.2 lib/angellist_api/client/users.rb
angellist_api-0.0.1 lib/angellist_api/client/users.rb