Skip to content

Commit

Permalink
Add Roxygen docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jimhester committed Jul 25, 2014
1 parent 961d2cc commit 0161598
Show file tree
Hide file tree
Showing 31 changed files with 750 additions and 0 deletions.
29 changes: 29 additions & 0 deletions man/attachment.Rd
@@ -0,0 +1,29 @@
% Generated by roxygen2 (4.0.1.99): do not edit by hand
\name{attachment}
\alias{attachment}
\title{Retrieve an attachment to a message}
\usage{
attachment(id, message_id, user_id = "me")
}
\arguments{
\item{id}{id of the attachment}

\item{message_id}{id of the parent message}

\item{user_id}{gmail user_id to access, special value of 'me' indicates the authenticated user.}
}
\description{
Function to retrieve an attachment to a message by id of the attachment
and message. To save the attachment use \code{\link{save_attachment}}.
}
\examples{
\dontrun{
my_attachment = attachment('a32e324b', '12345')
save attachment to a file
save_attachment(my_attachment, 'photo.jpg')
}
}
\references{
\url{https://developers.google.com/gmail/api/v1/reference/users/messages/attachments/get}
}

22 changes: 22 additions & 0 deletions man/body.Rd
@@ -0,0 +1,22 @@
% Generated by roxygen2 (4.0.1.99): do not edit by hand
\name{body}
\alias{body}
\title{Get the body text of a message or draft}
\usage{
body(x, ...)
}
\arguments{
\item{x}{the object from which to retrieve the body}

\item{...}{other parameters passed to methods}
}
\description{
Get the body text of a message or draft
}
\examples{
\dontrun{
body(my_message)
body(my_draft)
}
}

18 changes: 18 additions & 0 deletions man/body.gmail_message.Rd
@@ -0,0 +1,18 @@
% Generated by roxygen2 (4.0.1.99): do not edit by hand
\name{body.gmail_message}
\alias{body.gmail_message}
\title{Extract the message body from an email message}
\usage{
\method{body}{gmail_message}(x, collapse = FALSE, ...)
}
\arguments{
\item{x}{message to retrieve body for}

\item{collapse}{collapse multipart message into one}

\item{...}{other options ignored}
}
\description{
If a multipart message was returned each part will be a separate list item.
}

24 changes: 24 additions & 0 deletions man/create_label.Rd
@@ -0,0 +1,24 @@
% Generated by roxygen2 (4.0.1.99): do not edit by hand
\name{create_label}
\alias{create_label}
\title{Create a new label}
\usage{
create_label(name, label_list_visibility = c("hide", "show", "show_unread"),
message_list_visibility = c("hide", "show"), user_id = "me")
}
\arguments{
\item{name}{name to give to the new label}

\item{label_list_visibility}{The visibility of the label in the label list in the Gmail web interface.}

\item{message_list_visibility}{The visibility of messages with this label in the message list in the Gmail web interface.}

\item{user_id}{gmail user_id to access, special value of 'me' indicates the authenticated user.}
}
\description{
Function to create a label.
}
\references{
\url{https://developers.google.com/gmail/api/v1/reference/users/labels/create}
}

22 changes: 22 additions & 0 deletions man/date.Rd
@@ -0,0 +1,22 @@
% Generated by roxygen2 (4.0.1.99): do not edit by hand
\name{date}
\alias{date}
\title{Get the date field of a message or draft}
\usage{
date(x, ...)
}
\arguments{
\item{x}{the object from which to retrieve the field}

\item{...}{other parameters passed to methods}
}
\description{
Get the date field of a message or draft
}
\examples{
\dontrun{
date(my_message)
date(my_draft)
}
}

19 changes: 19 additions & 0 deletions man/delete_label.Rd
@@ -0,0 +1,19 @@
% Generated by roxygen2 (4.0.1.99): do not edit by hand
\name{delete_label}
\alias{delete_label}
\title{Permanently delete a label}
\usage{
delete_label(id, user_id = "me")
}
\arguments{
\item{id}{label id to retrieve}

\item{user_id}{gmail user_id to access, special value of 'me' indicates the authenticated user.}
}
\description{
Function to delete a label by id. This cannot be undone!
}
\references{
\url{https://developers.google.com/gmail/api/v1/reference/users/labels/delete}
}

24 changes: 24 additions & 0 deletions man/delete_message.Rd
@@ -0,0 +1,24 @@
% Generated by roxygen2 (4.0.1.99): do not edit by hand
\name{delete_message}
\alias{delete_message}
\title{Permanently delete a single message}
\usage{
delete_message(id, user_id = "me")
}
\arguments{
\item{id}{message id to access}

\item{user_id}{gmail user_id to access, special value of 'me' indicates the authenticated user.}
}
\description{
Function to delete a given message by id. This cannot be undone!
}
\examples{
\dontrun{
delete_message('12345')
}
}
\references{
\url{https://developers.google.com/gmail/api/v1/reference/users/messages/delete}
}

26 changes: 26 additions & 0 deletions man/draft.Rd
@@ -0,0 +1,26 @@
% Generated by roxygen2 (4.0.1.99): do not edit by hand
\name{draft}
\alias{draft}
\title{Get a single draft}
\usage{
draft(id, user_id = "me", format = c("full", "minimal", "raw"))
}
\arguments{
\item{id}{draft id to access}

\item{user_id}{gmail user_id to access, special value of 'me' indicates the authenticated user.}

\item{format}{format of the draft returned}
}
\description{
Function to retrieve a given draft by id
}
\examples{
\dontrun{
my_draft = draft('12345')
}
}
\references{
\url{https://developers.google.com/gmail/api/v1/reference/users/drafts/get}
}

28 changes: 28 additions & 0 deletions man/drafts.Rd
@@ -0,0 +1,28 @@
% Generated by roxygen2 (4.0.1.99): do not edit by hand
\name{drafts}
\alias{drafts}
\title{Get a list of drafts}
\usage{
drafts(num_results = NULL, page_token = NULL, user_id = "me")
}
\arguments{
\item{num_results}{the number of results to return.}

\item{page_token}{retrieve a specific page of results}

\item{user_id}{gmail user_id to access, special value of 'me' indicates the authenticated user.}
}
\description{
Get a list of drafts possibly matching a given query string.
}
\examples{
\dontrun{
my_drafts = drafts()

first_10_drafts = drafts(10)
}
}
\references{
\url{https://developers.google.com/gmail/api/v1/reference/users/drafts/list}
}

22 changes: 22 additions & 0 deletions man/from.Rd
@@ -0,0 +1,22 @@
% Generated by roxygen2 (4.0.1.99): do not edit by hand
\name{from}
\alias{from}
\title{Get the from field of a message or draft}
\usage{
from(x, ...)
}
\arguments{
\item{x}{the object from which to retrieve the field}

\item{...}{other parameters passed to methods}
}
\description{
Get the from field of a message or draft
}
\examples{
\dontrun{
from(my_message)
from(my_draft)
}
}

22 changes: 22 additions & 0 deletions man/gmail_auth.Rd
@@ -0,0 +1,22 @@
% Generated by roxygen2 (4.0.1.99): do not edit by hand
\name{gmail_auth}
\alias{gmail_auth}
\title{Setup oauth authentication for your gmail}
\usage{
gmail_auth(secret_file, scope = c("read_only", "modify", "compose", "full"))
}
\arguments{
\item{secret_file}{the secret json file downloaded from \url{https://cloud.google.com/console#/project}}

\item{scope}{the authentication scope to use}
}
\description{
Setup oauth authentication for your gmail
}
\examples{
\dontrun{
body(my_message)
body(my_draft)
}
}

31 changes: 31 additions & 0 deletions man/history.Rd
@@ -0,0 +1,31 @@
% Generated by roxygen2 (4.0.1.99): do not edit by hand
\name{history}
\alias{history}
\title{Retrieve change history for the inbox}
\usage{
history(start_history_id = NULL, num_results = NULL, label_id = NULL,
page_token = NULL, user_id = "me")
}
\arguments{
\item{start_history_id}{the point to start the history. The historyId can be obtained from a message, thread or previous list response.}

\item{num_results}{the number of results to return, max per page is 100}

\item{label_id}{filter history only for this label}

\item{page_token}{retrieve a specific page of results}

\item{user_id}{gmail user_id to access, special value of 'me' indicates the authenticated user.}
}
\description{
Retrieves the history results in chronological order
}
\examples{
\dontrun{
my_history = history("10")
}
}
\references{
\url{https://developers.google.com/gmail/api/v1/reference/users/history/list}
}

22 changes: 22 additions & 0 deletions man/id.Rd
@@ -0,0 +1,22 @@
% Generated by roxygen2 (4.0.1.99): do not edit by hand
\name{id}
\alias{id}
\title{Get the id of a message or draft}
\usage{
id(x, ...)
}
\arguments{
\item{x}{the object from which to retrieve the id}

\item{...}{other parameters passed to methods}
}
\description{
Get the id of a message or draft
}
\examples{
\dontrun{
id(my_message)
id(my_draft)
}
}

19 changes: 19 additions & 0 deletions man/label.Rd
@@ -0,0 +1,19 @@
% Generated by roxygen2 (4.0.1.99): do not edit by hand
\name{label}
\alias{label}
\title{Get a specific label}
\usage{
label(id, user_id = "me")
}
\arguments{
\item{id}{label id to retrieve}

\item{user_id}{gmail user_id to access, special value of 'me' indicates the authenticated user.}
}
\description{
Get a specific label by id and user_id.
}
\references{
\url{https://developers.google.com/gmail/api/v1/reference/users/labels/get}
}

22 changes: 22 additions & 0 deletions man/labels.Rd
@@ -0,0 +1,22 @@
% Generated by roxygen2 (4.0.1.99): do not edit by hand
\name{labels}
\alias{labels}
\title{Get a list of all labels}
\usage{
labels(user_id = "me")
}
\arguments{
\item{user_id}{gmail user_id to access, special value of 'me' indicates the authenticated user.}
}
\description{
Get a list of all labels for a user.
}
\examples{
\dontrun{
my_labels = labels()
}
}
\references{
\url{https://developers.google.com/gmail/api/v1/reference/users/labels/list}
}

26 changes: 26 additions & 0 deletions man/message.Rd
@@ -0,0 +1,26 @@
% Generated by roxygen2 (4.0.1.99): do not edit by hand
\name{message}
\alias{message}
\title{Get a single message}
\usage{
message(id, user_id = "me", format = c("full", "minimal", "raw"))
}
\arguments{
\item{id}{message id to access}

\item{user_id}{gmail user_id to access, special value of 'me' indicates the authenticated user.}

\item{format}{format of the message returned}
}
\description{
Function to retrieve a given message by id
}
\examples{
\dontrun{
my_message = message(12345)
}
}
\references{
\url{https://developers.google.com/gmail/api/v1/reference/users/messages}
}

0 comments on commit 0161598

Please sign in to comment.