diff --git a/.Rbuildignore b/.Rbuildignore
index 69122e0..cbf6444 100644
--- a/.Rbuildignore
+++ b/.Rbuildignore
@@ -1,5 +1,7 @@
-^lacramr\.Rproj$
+^lacrmr\.Rproj$
^\.Rproj\.user$
^doc$
+^docs$
^Meta$
^README\.Rmd$
+
diff --git a/DESCRIPTION b/DESCRIPTION
index 011b8e0..b775754 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -16,12 +16,12 @@ Authors@R: c(
role = "aut",
email="frans@ixpantia.com"))
Description: Connect to the Less Annoying CRM API to get your data clean and tidy.
-License: GPL + file LICENCE
+License: GPL-3 | file LICENSE
URL: https://ixpantia.github.io/lacrmr/
BugReports: https://github.com/ixpantia/lacrmr/issues
Encoding: UTF-8
LazyData: true
-RoxygenNote: 7.0.2
+RoxygenNote: 7.1.0
Depends:
R (>= 3.6),
magrittr
@@ -37,4 +37,6 @@ Imports:
jsonlite,
janitor,
sjmisc,
- httptest
+ httptest,
+ stringr,
+ mockery
diff --git a/NAMESPACE b/NAMESPACE
index f101ca9..8f13d34 100644
--- a/NAMESPACE
+++ b/NAMESPACE
@@ -5,3 +5,4 @@ export(get_contact_information)
export(get_pipeline_report)
export(search_contacts)
import(magrittr)
+importFrom(dplyr,"%>%")
diff --git a/R/lacrmr.R b/R/lacrmr.R
new file mode 100644
index 0000000..5e79fe1
--- /dev/null
+++ b/R/lacrmr.R
@@ -0,0 +1,19 @@
+#' \code{lacrmr} package
+#'
+#' Connect to the Less Annoying CRM API to get your data clean and tidy.
+#'
+#' See the README on
+#'
+#' @docType package
+#' @name lacramr
+#' @importFrom dplyr %>%
+NULL
+
+## quiets concerns of R CMD check re: the .'s that appear in pipelines
+utils::globalVariables(c(".", "Success", "result_email", "result_phone",
+ "result_address", "result_website",
+ "result_contact_custom_fields", "Result.FirstName",
+ "result_email", "result_phone", "result_website",
+ "filter", "select", "Text", "Type", "bind_cols",
+ "result_custom_fields"
+ ))
diff --git a/R/utils.R b/R/utils.R
index 8f6f6ae..143c85e 100644
--- a/R/utils.R
+++ b/R/utils.R
@@ -1,6 +1,6 @@
#' GET call to lacrm API
#' @param x an integer
-#' @NoRd
+#' @noRd
get_request <- function(user_code, api_token, api_function, ...) {
item <- paste0(...)
diff --git a/README.Rmd b/README.Rmd
index e4c911f..f4ce092 100644
--- a/README.Rmd
+++ b/README.Rmd
@@ -13,7 +13,7 @@ knitr::opts_chunk$set(
)
```
-# lacrmr
+# lacrmr
[![CRAN status](https://www.r-pkg.org/badges/version/lacrmr)](https://cran.r-project.org/package=lacrmr)
diff --git a/README.md b/README.md
index 024b4de..19c5e3e 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,7 @@
-# lacrmr
+# lacrmr
@@ -69,8 +69,8 @@ sales <- get_pipeline_report(user_code = "12454",
## Use glimpse function to check the data frame
dplyr::glimpse(sales)
-#> Observations: 7
-#> Variables: 33
+#> Rows: 7
+#> Columns: 33
#> $ result_contact_id "35041909076033466731615…
#> $ result_user_id "334595", "435944", "334…
#> $ result_company_id NA, NA, NA, NA, NA, NA, …
diff --git a/img/lacrmR.png b/man/figures/lacrmR.png
similarity index 100%
rename from img/lacrmR.png
rename to man/figures/lacrmR.png
diff --git a/man/get_request.Rd b/man/get_request.Rd
deleted file mode 100644
index 4557060..0000000
--- a/man/get_request.Rd
+++ /dev/null
@@ -1,14 +0,0 @@
-% Generated by roxygen2: do not edit by hand
-% Please edit documentation in R/utils.R
-\name{get_request}
-\alias{get_request}
-\title{GET call to lacrm API}
-\usage{
-get_request(user_code, api_token, api_function, ...)
-}
-\arguments{
-\item{x}{an integer}
-}
-\description{
-GET call to lacrm API
-}
diff --git a/man/lacramr.Rd b/man/lacramr.Rd
new file mode 100644
index 0000000..459d114
--- /dev/null
+++ b/man/lacramr.Rd
@@ -0,0 +1,12 @@
+% Generated by roxygen2: do not edit by hand
+% Please edit documentation in R/lacrmr.R
+\docType{package}
+\name{lacramr}
+\alias{lacramr}
+\title{\code{lacrmr} package}
+\description{
+Connect to the Less Annoying CRM API to get your data clean and tidy.
+}
+\details{
+See the README on
+}
diff --git a/tests/testthat.R b/tests/testthat.R
index dcc76bc..803d9d1 100644
--- a/tests/testthat.R
+++ b/tests/testthat.R
@@ -1,4 +1,5 @@
library(testthat)
library(lacrmr)
+library(mockery)
test_check("lacrmr")
diff --git a/tests/testthat/test-error-warning-msg.R b/tests/testthat/test-error-warning-msg.R
deleted file mode 100644
index 40ffd03..0000000
--- a/tests/testthat/test-error-warning-msg.R
+++ /dev/null
@@ -1,24 +0,0 @@
-context("Error and warning messages")
-
-testthat::test_that("Invalid credentials", {
- expect_warning(
- get_pipeline_report(api_token = "96066",
- pipelineid = "57102821"),
- "Please add a valid user code"
- )
-
- expect_warning(
- get_pipeline_report(user_code = "6A6E88",
- pipelineid = "57102821"),
- "Please add a valid API token"
- )
-
- expect_warning(
- get_pipeline_report(user_code = "6A6E88",
- api_token = "96066"),
- "Please add a valid pipeline ID"
- )
-})
-
-
-
diff --git a/tests/testthat/test-limpiar.R b/tests/testthat/test-limpiar.R
index d022a29..35c1299 100644
--- a/tests/testthat/test-limpiar.R
+++ b/tests/testthat/test-limpiar.R
@@ -1,3 +1,4 @@
+
context("limpieza")
testthat::test_that("listas son eliminadas de datos de contactos", {