Method: ScraperWiki::API#scraper_getruninfo

Defined in:
lib/scraperwiki-api.rb

#scraper_getruninfo(shortname, opts = {}) ⇒ Array

Note:

Returns an array although the array seems to always have only one item

Note:

The query string parameter is name, not shortname as in the ScraperWiki docs

See what the scraper did during each run.

Example output:

[
  {
    "run_ended": "1970-01-01T00:00:00",
    "first_url_scraped": "http://www.iana.org/domains/example/",
    "pages_scraped": 5,
    "run_started": "1970-01-01T00:00:00",
    "runid": "1325394000.000000_xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx",
    "domainsscraped": [
      {
        "domain": "http://example.com",
        "bytes": 1000000,
        "pages": 5
      }
      ...
    ],
    "output": "...",
    "records_produced": 42
  }
]

Parameters:

  • shortname (String)

    the scraper’s shortname (as it appears in the URL)

  • opts (Hash) (defaults to: {})

    optional arguments

Options Hash (opts):

  • runid (String)

    a run ID

Returns:

  • (Array)


237
238
239
# File 'lib/scraperwiki-api.rb', line 237

def scraper_getruninfo(shortname, opts = {})
  request_with_apikey '/scraper/getruninfo', {name: shortname}.merge(opts)
end