fetch_products: Fetch all structured products data from thousands of online...

Description Usage Arguments References Examples

Description

Fetch all structured products data from thousands of online retailers and e-commerce sites

Usage

1
2
3
fetch_products(query, sort = "relevancy", ts = (Sys.time() - (3 * 24 * 60 *
  60)), pre_alloc_max = 30, quiet = !interactive(),
  token = Sys.getenv("WEBHOSE_TOKEN"), ...)

Arguments

query

A string query containing the filters that define which products will be returned.

sort

By default the results are sorted by relevancy. Acceptable values are "relevancy", "social.facebook.likes", "social.facebook.shares", "social.facebook.comments", "social.gplus.shares", "social.pinterest.shares", "social.linkedin.shares", "social.stumbledupon.shares", "social.vk.shares", "replies_count", "participants_count", "spam_score", "performance_score", "published", "thread.published", "domain_rank", "ord_in_thread", "rating".

ts

A timestamp to start the search from. If a POSIXct is passed in, it will be converted to the necessary value in milliseconds. Default is previous 3 days.

pre_alloc_max

If you know the approximate number of API calls that will need to be made to retrieve a full set of records for a query, use that number here (defaults to 30, which is enough space to hold 3,000 total records if each API call returns 100). This helps pre-allocate space and avoid copying interim buffers as the result set expands.

quiet

By default, calls in interactive sessions will return fetch status updates. Use TRUE to suppress these messages.

token

Your private access token. You get a unique access token when you sign up. Store it in an environment variable WEBHOSE_TOKEN (usually in ~/.Renviron) or provide it directly.

...

other parameters passed on (eventually) to httr::GET()

References

webhose API

Examples

1
2
3
4
## Not run: 
res <- fetch_products("name:iphone")

## End(Not run)

hrbrmstr/webhose documentation built on May 30, 2019, 6:56 p.m.