class Github::Users::Followers
def follow(*args)
github.users.followers.follow user: 'user-name'
github.users.followers.follow 'user-name'
github = Github.new oauth_token: '...'
= Examples
Follow a user
def follow(*args) arguments(args, :required => [:user]) put_request("/user/following/#{user}", arguments.params) end
def following(*args)
github.users.followers.following
github = Github.new oauth_token: '...'
= Examples
List who the authenicated user is following
github.users.followers.following 'user-name' { |user| ... }
github.users.followers.following 'user-name'
github = Github.new
= Examples
List who a user is following
def following(*args) params = arguments(args).params response = if user_name = arguments.remaining.first get_request("/users/#{user_name}/following", params) else get_request("/user/following", params) end return response unless block_given? response.each { |el| yield el } end
def following?(*args)
github.users.followers.following? user: 'user-name'
github.users.followers.following? 'user-name'
github = Github.new oauth_token: '...'
= Examples
Check if you are following a user
def following?(*args) arguments(args, :required => [:user]) get_request("/user/following/#{user}", arguments.params) true rescue Github::Error::NotFound false end
def list(*args)
github.users.followers { |user| ... }
github.users.followers
github = Github.new oauth_token: '...'
= Examples
List the authenticated user's followers
github.users.followers.list 'user-name' { |user| ... }
github.users.followers.list 'user-name'
github = Github.new
= Examples
List a user's followers
def list(*args) params = arguments(args).params response = if user_name = arguments.remaining.first get_request("/users/#{user_name}/followers", params) else get_request("/user/followers", params) end return response unless block_given? response.each { |el| yield el } end
def unfollow(*args)
github.users.followers.unfollow user: 'user-name'
github.users.followers.unfollow 'user-name'
github = Github.new oauth_token: '...'
= Examples
Unfollow a user
def unfollow(*args) arguments(args, :required => [:user]) delete_request("/user/following/#{user}", arguments.params) end