Skip to content

Instantly share code, notes, and snippets.

@haarg
Created August 29, 2013 16:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save haarg/6380159 to your computer and use it in GitHub Desktop.
Save haarg/6380159 to your computer and use it in GitHub Desktop.
MetaCPAN::API
->new(base_url, user_agent)
->author(author_id) # returns a ::Author object
->author_search({ query }) # returns a ::ResultSet object
# additional methods for objects
# additional methods for backcompat
MetaCPAN::API::Author
->name
# etc
MetaCPAN::API::Request
# used for querying and interpreting results
MetaCPAN::API::ResultSet
->first
->page
->all # all pages?
MetaCPAN::API::ResultIterator
->next
# automatic pagination
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment