knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
The goal of walmartAPI is to give access to the API created by walmartlabs to search products, locate stores etc etc.
To use this package you will need an API key which you can acquire by signing up on this website https://developer.walmartlabs.com/member.
walmartAPI is available on CRAN and can be installed normally with
install.packages("walmartAPI") #from CRAN
or you can install walmartAPI from github with:
# install.packages("devtools") devtools::install_github("EmilHvitfeldt/walmartAPI")
This package provides a handful for functionalities. We are able to look up a specific product based on an ID.
library(tidyverse) library(walmartAPI) key <- "************************" walmartAPI::lookup(id = 19336123, key = key)
library(tidyverse) library(walmartAPI) walmartAPI::lookup(id = 19336123, key = "z2gz6g9jefqsjsye7fttakey")
search in products using plain text
walmartAPI::searching("ipod", key = key)
walmartAPI::searching("ipod", key = "z2gz6g9jefqsjsye7fttakey")
and locate stores in your area
store_locator(city = "Houston", key = key)
store_locator(city = "Houston", key = "z2gz6g9jefqsjsye7fttakey")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.