Skip to content

taylorbarstow/nytimes-articles

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

74 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

= nytimes-articles

A simple GEM for interacting with the New York Times' Article Search API (http://developer.nytimes.com/docs/article_search_api)

== USAGE

	require 'rubygems'
	require 'nytimes-articles'
	
	include Nytimes::Articles
	Base.api_key = 'YOUR API KEY'
	Article.search 'ice cream'
	Article.search :title => '"ice cream"', :since => 3.weeks.ago, :fields => :all
	Article.search :author => 'Sewell Chan', :facets => [Facet::GEO, Facet::PERSON], :fields => :all

See the RDOC for Article#search for better instructions on usage.

== TODO

The following functionality is still to be implemented:

* Parsing multimedia and related_multimedia fields
* Parsing smallimage fields
* Coercion of some facet results into more suitable Ruby types (mostly Dates / Integer fields)
* Next / previous result set pagination (with memoization?)

== COPYRIGHT
Copyright (c) 2008 Jacob Harris. See LICENSE for details.

About

A gem for accessing the NYTimes Article Search API

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 100.0%