Sha256: ddd2e4e7cda59bc3d8bbc59e276b097d56bc71901742ebe2c42524eb89edaac0

Contents?: true

Size: 508 Bytes

Versions: 1

Compression:

Stored size: 508 Bytes

Contents

class Pupil
  def user(target, option={})
    response = self.get("users/show.json", {guess_parameter(target) => target}.update(option))
    return false unless response
    user = User.new(response, @access_token)
    return user
  end
  
  def search_user(keyword, option={})
    response = self.get("users/search.json", {:q => keyword}.update(option))
    users = Array.new
    response.each do |element|
      user = User.new(element, @access_token)
      users << user
    end
    return users
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
pupil-0.7 lib/pupil/users.rb