get_image: Get data about a URL from Diffbot, using the image API

Description Usage Arguments Value Examples

View source: R/diffbot.R

Description

Get data for a URL from the image API. For more information see Diffbot's documenation.

Usage

1
get_image(url, api_key, fields = NULL, timeout = NULL, callback = NULL)

Arguments

url

The URL to analyse.

api_key

Your API key (also called token in the diffbot documenation).

fields

Extra fields, as a vector. Options are: links, meta, querystring, breadcrumb, displayWidth, displayHeight.

timeout

How long to wait before timing out request for URL's content.

callback

Used for jsonp requests. See documentation.

Value

An object of class 'diffbot_api'; a list of information returned from Diffbot.

Examples

1
2
3
4
5
6
7
8
## Not run: 
api_key <- '12345'
url <- 'http://techcrunch.com/2012/05/31/diffbot-raises-2-million-seed-round-for-web-content-extraction-technology/'

get_diffbot(url, api_key)
get_diffbot(url, api_key, fallback = 'article', discussion = FALSE)

## End(Not run)

mhairi/diffbotr documentation built on May 22, 2019, 8:56 p.m.