Class: GitHubWatched::API::User

Inherits:
Base
  • Object
show all
Defined in:
lib/github_watched/api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#connection, #list

Constructor Details

#initialize(username) ⇒ User

Returns a new instance of User.



35
36
37
# File 'lib/github_watched/api.rb', line 35

def initialize(username)
  @username = username
end

Instance Attribute Details

#usernameObject

Returns the value of attribute username.



33
34
35
# File 'lib/github_watched/api.rb', line 33

def username
  @username
end

Instance Method Details

#watchedObject



39
40
41
# File 'lib/github_watched/api.rb', line 39

def watched
  list "/users/#{CGI.escape(username)}/watched", :paginated => true, :klass => OctocatHerder::Repository
end