Sha256: 74c6a47faa4317f44b5d2f65979cb890752c9584377f58e06b4e5c30a464337b

Contents?: true

Size: 825 Bytes

Versions: 3

Compression:

Stored size: 825 Bytes

Contents

module Octokit
  class Client

    # Methods for the Feeds API
    #
    # @see http://developer.github.com/v3/activity/feeds/
    module Feeds

      # List Feeds
      #
      # The feeds returned depend on authentication, see the GitHub API docs
      # for more information.
      #
      # @return [Array<Sawyer::Resource>] list of feeds
      # @see http://developer.github.com/v3/activity/feeds/#list-feeds
      def feeds
        get "feeds"
      end

      # Get a Feed by name
      #
      # @param [Symbol, String] Name of feed to retrieve.
      # @return [Feed] Parsed feed in the format returned by the configured
      #   parser.
      def feed(name, options = {})
        if rel = feeds._links[name]
          get rel.href, :accept => rel.type, :options => options
        end
      end

    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
octokit-2.7.2 lib/octokit/client/feeds.rb
octokit-2.7.1 lib/octokit/client/feeds.rb
octokit-2.7.0 lib/octokit/client/feeds.rb