Sha256: 425a7e6848daba8ac11aa5556a7a961fb821432bf8a4311c6dcfe5fd9a6c7a89

Contents?: true

Size: 747 Bytes

Versions: 3

Compression:

Stored size: 747 Bytes

Contents

module ReadabilityParser
  module API
    module Content

      # Parse a webpage and return its main content
      # Returns a ReadabilityParser::Article object
      #
      # Optionally pass the ID of an article as `id => "id"` in `options` to return the content for a specific DOM node
      # You can also pass a `max_pages` integer to set the maximum number of pages to parse and combine. Default is 25.
      #
      # @param url [String] The URL of an article to return the content for
      # @return [ReadabilityParser::Article]
      def parse(url, options={})
        params = {:url => url}
        response = get('', params.merge(options))

        ReadabilityParser::Article.new(response)
      end
    end # Content
  end # API
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
readability_parser-0.0.3 lib/readability_parser/api/content.rb
readability_parser-0.0.2 lib/readability_parser/api/content.rb
readability_parser-0.0.1 lib/readability_parser/api/content.rb