class Github::Client::Activity::Feeds

Public Instance Methods

all(*args)
Alias for: list
find(*args)
Alias for: get
get(*args) click to toggle source

Get all the items for a named timeline

@see developer.github.com/v3/activity/feeds/#list-feeds

@example

github = Github.new
github.activity.feeds.get "timeline"

@param [String] name

the name of the timeline resource

@api public

# File lib/github_api/client/activity/feeds.rb, line 37
def get(*args)
  arguments(args, required: [:name])

  name = arguments.name
  response = list.body._links[name]
  if response
    params = arguments.params
    params['accept'] = response.type
    get_request(response.href, params)
  end
end
Also aliased as: find
list(*args) { |el| ... } click to toggle source

List all the feeds available to the authenticated user.

@see developer.github.com/v3/activity/feeds/#list-feeds

@example

github = Github.new
github.activity.feeds.list

@api public

# File lib/github_api/client/activity/feeds.rb, line 16
def list(*args)
  arguments(args)

  response = get_request("/feeds", arguments.params)
  return response unless block_given?
  response.each { |el| yield el }
end
Also aliased as: all