-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathREADME.Rmd
76 lines (54 loc) · 2.08 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r setup, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# walmartAPI
[](https://travis-ci.org/EmilHvitfeldt/walmartAPI) [](https://cran.r-project.org/package=walmartAPI)

The goal of **walmartAPI** is to give access to the API created by [walmartlabs](https://developer.walmartlabs.com/) 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.
## Installation
**walmartAPI** is available on CRAN and can be installed normally with
```{r cran-installation, eval = FALSE}
install.packages("walmartAPI") #from CRAN
```
or you can install **walmartAPI** from github with:
```{r gh-installation, eval = FALSE}
# install.packages("devtools")
devtools::install_github("EmilHvitfeldt/walmartAPI")
```
## Examples
This package provides a handful for functionalities. We are able to look up a specific product based on an ID.
```{r, eval=FALSE}
library(tidyverse)
library(walmartAPI)
key <- "************************"
walmartAPI::lookup(id = 19336123, key = key)
```
```{r, echo=FALSE, message=FALSE, warning=FALSE}
library(tidyverse)
library(walmartAPI)
walmartAPI::lookup(id = 19336123, key = "z2gz6g9jefqsjsye7fttakey")
```
search in products using plain text
```{r, eval=FALSE}
walmartAPI::searching("ipod", key = key)
```
```{r, echo=FALSE, message=FALSE, warning=FALSE}
walmartAPI::searching("ipod", key = "z2gz6g9jefqsjsye7fttakey")
```
and locate stores in your area
```{r, eval=FALSE}
store_locator(city = "Houston", key = key)
```
```{r, echo=FALSE, message=FALSE, warning=FALSE}
store_locator(city = "Houston", key = "z2gz6g9jefqsjsye7fttakey")
```