Sha256: 40a52801556c48121a9e8a12202b93c7afa62f66c2a981e0b13d6e1c37fedbe6

Contents?: true

Size: 514 Bytes

Versions: 10

Compression:

Stored size: 514 Bytes

Contents

class Pupil
  def user(target, option={})
    response = self.get("/1/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("/1/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

10 entries across 10 versions & 1 rubygems

Version Path
pupil-0.6.2 lib/pupil/users.rb
pupil-0.6.1 lib/pupil/users.rb
pupil-0.6 lib/pupil/users.rb
pupil-0.5 lib/pupil/users.rb
pupil-0.4.1 lib/pupil/users.rb
pupil-0.4 lib/pupil/users.rb
pupil-0.3.3 lib/pupil/users.rb
pupil-0.3.2 lib/pupil/users.rb
pupil-0.3.1 lib/pupil/users.rb
pupil-0.3.0 lib/pupil/users.rb