Permalink
Browse files

added more documentation, renamed functions to maintain uniformity.

  • Loading branch information...
1 parent a04269d commit 4518f8cbd3b4771a3b841771420e059250e813eb @karthik karthik committed Apr 20, 2012
View
@@ -58,3 +58,5 @@ Collate:
'user_pub_stats.r'
'user_tag_stats.r'
'user_delete_group.r'
+ 'RMendeley.R'
+ 'startup.r'
View
@@ -21,7 +21,7 @@ export(groupDocInfo)
export(groupDocs)
export(groupPeople)
export(groups)
-export(leave_group)
+export(leaveGroup)
export(mendeley_auth)
export(mendeley_library)
export(mendeley_profile)
@@ -44,7 +44,7 @@ export(subset_by_author)
export(tagged)
export(tags)
export(tagStats)
-export(unfollow_group)
+export(unfollowGroup)
exportClasses(MendeleyCredentials)
exportClasses(MendeleyDocumentID)
exportClasses(MendeleyFolderID)
View
@@ -0,0 +1,50 @@
+#' RMendeley - Programmatic interface to the Mendeley Web
+#'
+#' This is version 1.0.0 of package RMendeley.
+
+#' \strong{Personal functions}
+#' \link{mendeley_library}
+#' \link{mendeley_profile}
+#' \link{pubStats}
+#' \link{tagStats}
+#' \link{authoredPubs}
+#' \link{authorStats}
+#' \link{contacts}
+#' \link{addContact}
+#'
+#'
+#' \strong{Folder functions}
+#' \link{createFolder}
+#' \link{deleteFolder}
+#' \link{folderDocs}
+#' \link{Folders}
+#' \link{addFolderDoc}
+#' \link{getFolderID}
+#'
+#'
+#' \strong{Document functions}
+#' \link{docInfo}
+#'
+#'
+#'\strong{Group functions}
+#' \link{myGroups}
+#' \link{createGroup}
+#' \link{deleteGroup}
+#' \link{groupDocs}
+#' \link{groupDocInfo}
+#' \link{groupPeople}
+#' \link{leaveGroup}
+#' \link{unfollowGroup}
+#' \link{getGroupID}
+#'
+#'
+#' \strong{Useful links}
+#' \href{http://mendeley.com/}{Mendeley}
+#' \href{http://apidocs.mendeley.com/}{Full API documentation}
+
+
+
+#' @name RMendeley
+#' @docType package
+#' @aliases RMendeley package-RMendeley
+NULL
View
@@ -0,0 +1,3 @@
+.onAttach <- function(...) {
+packageStartupMessage("\n ?RMendeley for a quick start guide. Use suppressPackageStartupMessages() to suppress this message in future\n")
+}
View
@@ -53,9 +53,9 @@ if (ask) {
#' @param ... optional additional curl options (debugging tools mostly).
#'@export
#'@examples \dontrun{
-#' user_delete_group(mc, ...)
+#' leaveGroup(mc, ...)
#'}
-leave_group <- function(mc = NULL, group = NULL, ..., curl = getCurlHandle()) {
+leaveGroup <- function(mc = NULL, group = NULL, ..., curl = getCurlHandle()) {
if (!is(mc, "MendeleyCredentials"))
stop("Invalid or missing Mendeley credentials. ?mendeley_auth for more information.",
call. = FALSE)
@@ -84,9 +84,9 @@ if (!is(mc, "MendeleyCredentials"))
#' @param ... optional additional curl options (debugging tools mostly).
#'@export
#'@examples \dontrun{
-#' user_delete_group(mc, ...)
+#' unfollowGroup(mc, ...)
#'}
-unfollow_group <- function(mc = NULL, group = NULL, ..., curl = getCurlHandle()) {
+unfollowGroup <- function(mc = NULL, group = NULL, ..., curl = getCurlHandle()) {
if (!is(mc, "MendeleyCredentials"))
stop("Invalid or missing Mendeley credentials. ?mendeley_auth for more information.",
call. = FALSE)
@@ -1,6 +1,5 @@
#'createDocument - Creates a new document in the user's library or a group. [not working]
#'
-#'<longer description>
#'@param mc OAuth object of class MendeleyCredentials
#'@param doc ...
#'@param type type of group. Can be public, private or invite.
@@ -1,8 +1,8 @@
#' User download file (not working because docInfo does not return file hash)
#'
#'@param mc OAuth object of class MendeleyCredentials
-#' @param doc <what param does>
-#' @param file <what param does>
+#' @param doc ...
+#' @param file File to download
#' @param binary logical. Set TRUE for binary files.
#'@param curl If using in a loop, call getCurlHandle() first and pass
#' the returned value in here (avoids unnecessary footprint)
View
@@ -0,0 +1,31 @@
+\docType{package}
+\name{RMendeley}
+\alias{package-RMendeley}
+\alias{RMendeley}
+\alias{RMendeley-package}
+\title{RMendeley - Programmatic interface to the Mendeley Web}
+\description{
+ This is version 1.0.0 of package RMendeley.
+ \strong{Personal functions} \link{mendeley_library}
+ \link{mendeley_profile} \link{pubStats} \link{tagStats}
+ \link{authoredPubs} \link{authorStats} \link{contacts}
+ \link{addContact}
+}
+\details{
+ \strong{Folder functions} \link{createFolder}
+ \link{deleteFolder} \link{folderDocs} \link{Folders}
+ \link{addFolderDoc} \link{getFolderID}
+
+ \strong{Document functions} \link{docInfo}
+
+ \strong{Group functions} \link{myGroups}
+ \link{createGroup} \link{deleteGroup} \link{groupDocs}
+ \link{groupDocInfo} \link{groupPeople} \link{leaveGroup}
+ \link{unfollowGroup} \link{getGroupID}
+
+ \strong{Useful links}
+ \href{http://mendeley.com/}{Mendeley}
+ \href{http://apidocs.mendeley.com/}{Full API
+ documentation}
+}
+
@@ -1,8 +1,8 @@
-\name{leave_group}
-\alias{leave_group}
+\name{leaveGroup}
+\alias{leaveGroup}
\title{The following methods will quit membership from a group}
\usage{
- leave_group(mc = NULL, group = NULL, ...,
+ leaveGroup(mc = NULL, group = NULL, ...,
curl = getCurlHandle())
}
\arguments{
@@ -22,7 +22,7 @@
}
\examples{
\dontrun{
-user_delete_group(mc, ...)
+leaveGroup(mc, ...)
}
}
@@ -1,8 +1,8 @@
-\name{unfollow_group}
-\alias{unfollow_group}
+\name{unfollowGroup}
+\alias{unfollowGroup}
\title{The following methods will essentially delete a group from the user's library.}
\usage{
- unfollow_group(mc = NULL, group = NULL, ...,
+ unfollowGroup(mc = NULL, group = NULL, ...,
curl = getCurlHandle())
}
\arguments{
@@ -23,7 +23,7 @@
}
\examples{
\dontrun{
-user_delete_group(mc, ...)
+unfollowGroup(mc, ...)
}
}

0 comments on commit 4518f8c

Please sign in to comment.