Initial import

Change-Id: Ibe34c4c9c5313d91ffbd1a4e6a7da85adc1d8c39
diff --git a/man/getAccessToken.Rd b/man/getAccessToken.Rd
new file mode 100644
index 0000000..b50b328
--- /dev/null
+++ b/man/getAccessToken.Rd
@@ -0,0 +1,19 @@
+% Generated by roxygen2: do not edit by hand
+% Please edit documentation in R/visitssummary.R
+\name{getAccessToken}
+\alias{getAccessToken}
+\title{get access token for matomo from keyring}
+\usage{
+getAccessToken(matomoUrl, id = "default")
+}
+\arguments{
+\item{matomoUrl}{base URL of your matomo instance}
+
+\item{id}{supply if you have multiple IDs, i.e. logins to your matomo instance}
+}
+\value{
+access token
+}
+\description{
+get access token for matomo from keyring
+}
diff --git a/man/getVisitsSummary.Rd b/man/getVisitsSummary.Rd
new file mode 100644
index 0000000..096897b
--- /dev/null
+++ b/man/getVisitsSummary.Rd
@@ -0,0 +1,52 @@
+% Generated by roxygen2: do not edit by hand
+% Please edit documentation in R/visitssummary.R
+\name{getVisitsSummary}
+\alias{getVisitsSummary}
+\title{Get visits summary from matomo API server}
+\usage{
+getVisitsSummary(
+  matomoUrl,
+  siteId,
+  period = "month",
+  date = "last16",
+  filter_limit = 100,
+  removeFirst = FALSE,
+  removeLast = FALSE,
+  accessToken = getAccessToken(matomoUrl)
+)
+}
+\arguments{
+\item{matomoUrl}{base URL of your matomo instance}
+
+\item{siteId}{matomo site id or vector of site ids}
+
+\item{period}{\code{day}, \code{week}, \code{month} or \code{year}}
+
+\item{date}{date range (see \url{https://developer.matomo.org/api-reference/reporting-api})}
+
+\item{filter_limit}{defines the maximum number of rows to be returned}
+
+\item{removeFirst}{logical that determines whether the first row of each site should be removed (to account for incomplete periods)}
+
+\item{removeLast}{logical that determines whether the last row of each site should be removed (to account for incomplete periods)
+and pass it here, or you can make it persistent with \code{\link{persistAccessToken}}.}
+
+\item{accessToken}{API Authentication Token - you can get this in your
+matomo interface under Settings -> Personal -> Settings -> API Authentication Token}
+}
+\value{
+data frame
+}
+\description{
+See matomo Reporting API Reference (\url{https://developer.matomo.org/api-reference/reporting-api}) for details.
+}
+\examples{
+\dontrun{
+df <- getVisitsSummary("https://demo.matomo.org/", siteId=3, period="day", date="last60")
+plot(df$nb_actions ~ df$date, type="b")
+}
+
+}
+\references{
+\url{https://developer.matomo.org/api-reference/reporting-api}
+}
diff --git a/man/persistAccessToken.Rd b/man/persistAccessToken.Rd
new file mode 100644
index 0000000..9d27b51
--- /dev/null
+++ b/man/persistAccessToken.Rd
@@ -0,0 +1,22 @@
+% Generated by roxygen2: do not edit by hand
+% Please edit documentation in R/visitssummary.R
+\name{persistAccessToken}
+\alias{persistAccessToken}
+\title{Save access token persistently to your keyring}
+\usage{
+persistAccessToken(matomoUrl, accessToken, id = "default")
+}
+\arguments{
+\item{matomoUrl}{base URL of your matomo instance}
+
+\item{accessToken}{your oauth token}
+
+\item{id}{supply if you have multiple IDs, i.e. logins to your matomo instance}
+}
+\description{
+Save access token persistently to your keyring
+}
+\examples{
+persistAccessToken("https://demo.matomo.org/", "ad7609a669179c4ebca7c995342f7e09")
+
+}
diff --git a/man/pipe.Rd b/man/pipe.Rd
new file mode 100644
index 0000000..32004dc
--- /dev/null
+++ b/man/pipe.Rd
@@ -0,0 +1,12 @@
+% Generated by roxygen2: do not edit by hand
+% Please edit documentation in R/reexports.R
+\name{\%>\%}
+\alias{\%>\%}
+\title{Pipe operator}
+\usage{
+lhs \%>\% rhs
+}
+\description{
+See \code{magrittr::\link[magrittr:pipe]{\%>\%}} for details.
+}
+\keyword{internal}
diff --git a/man/reexports.Rd b/man/reexports.Rd
new file mode 100644
index 0000000..23b7907
--- /dev/null
+++ b/man/reexports.Rd
@@ -0,0 +1,31 @@
+% Generated by roxygen2: do not edit by hand
+% Please edit documentation in R/reexports.R
+\docType{import}
+\name{reexports}
+\alias{reexports}
+\alias{bind_cols}
+\alias{mutate}
+\alias{select}
+\alias{group_by}
+\alias{summarise}
+\alias{n}
+\alias{complete}
+\alias{expand_grid}
+\alias{year}
+\alias{as_tibble}
+\title{Objects exported from other packages}
+\keyword{internal}
+\description{
+These objects are imported from other packages. Follow the links
+below to see their documentation.
+
+\describe{
+  \item{dplyr}{\code{\link[dplyr:bind]{bind_cols}}, \code{\link[dplyr]{group_by}}, \code{\link[dplyr]{mutate}}, \code{\link[dplyr:context]{n}}, \code{\link[dplyr]{select}}, \code{\link[dplyr]{summarise}}}
+
+  \item{lubridate}{\code{\link[lubridate]{year}}}
+
+  \item{tibble}{\code{\link[tibble]{as_tibble}}}
+
+  \item{tidyr}{\code{\link[tidyr]{complete}}, \code{\link[tidyr]{expand_grid}}}
+}}
+