| Module | ScraperWiki |
| In: |
lib/scraperwiki.rb
lib/scraperwiki/version.rb |
| VERSION | = | '3.0.2' |
Allows the user to retrieve a previously saved variable
ScraperWiki.get_var(‘current’, 0)
Saves the provided data into a local database for this scraper. Data is upserted into this table (inserted if it does not exist, updated if the unique keys say it does).
value. If sending lots of data this can be a array of hashes.
ScraperWiki::save([‘id’], {‘id’=>1})
Allows the user to save a single variable (at a time) to carry state across runs of the scraper.
ScraperWiki.save_var(‘current’, 100)
The scrape method fetches the content from a webserver.
NB This method hasn‘t been refactored or tested, but could prob do with both
ScraperWiki::scrape(‘scraperwiki.com’)
Allows for a simplified select statement
one-by-one to the black rather than loading and returning the whole result set
An array of hashes containing the returned data
ScraperWiki.select(’* from swdata’)