Skip to content

Commit

Permalink
Merge pull request #44 from lawinslow/master
Browse files Browse the repository at this point in the history
Fixed up documentation a bit
  • Loading branch information
Luke Winslow committed Mar 11, 2015
2 parents 1de2dc0 + f666a49 commit 4c4debe
Show file tree
Hide file tree
Showing 15 changed files with 41 additions and 16 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: sbtools
Title: USGS SB tools
Maintainer: Luke Winslow <lwinslow@usgs.gov>
Version: 0.8.1
Version: 0.8.2
Author: Luke Winslow
Description: Tools for interacting with SB interfaces.
Imports:
Expand Down
9 changes: 6 additions & 3 deletions R/authenticate_sb.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,16 @@
#'
#'@title Authenticate to SB for subsequent calls
#'
#'@param username Sciencebase username
#'@param password (optional) Sciencebase password, prompts user if not supplied
#'
#'@description
#'This connects to SB, authenticates and gets a session token for
#'communicating with SB.
#'
#'@import httr
#'
#'
#'
#'
#'@import httr
#'@export
authenticate_sb = function(username, password){

Expand Down
5 changes: 3 additions & 2 deletions R/item_append_files.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@
#'
#'@param id A ScienceBase item ID to upload to.
#'@param files A file path to upload.
#'@param sb_session A ScienceBase session object from authenticate_sb.
#'@param session A ScienceBase session object from authenticate_sb.
#'
#'@return ScienceBase Item.
#'
#'@import httr
#'
#'@examples \dontrun{
#'@examples
#'\dontrun{
#' sb_session<-authenticate_sb(sbusername)
#' item_append_files("54e265a4e4b08de9379b4dfb", '/foo/bar/baz.zip', sb)
#' }
Expand Down
3 changes: 2 additions & 1 deletion R/item_create.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@
#'@title Create a new SB item
#'
#'@param parent_id ID of the parent item
#'@param title The title of the new SB item
#'@param session Authenticated session object (from \link{authenticate_sb})
#'@param info (optional) list of metadata info for the new item
#'@return SB ID for the newly created item
#'
#'
#'x
#'@import httr
#'
#'@export
Expand Down
1 change: 1 addition & 0 deletions R/item_file_download.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#'@param destinations String vector list of destinations for requested files. Must be same length as \code{names}
#'@param dest_dir A directory path for saving files when \code{names} parameter is omitted
#'@param session Session object from \code{\link{authenticate_sb}}
#'@param overwrite_file Boolean indicating if file should be overwritten if it already exists locally
#'
#'@description
#'Function to downlod files attached to an item on SB. Either files can be specified directly
Expand Down
2 changes: 1 addition & 1 deletion R/item_list_files.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#'@title Get list of files attached to SB item
#'
#'@param id item ID
#'@param Session Session object from \link{authenticate_sb}
#'@param session Session object from \link{authenticate_sb}
#'
#'@return
#'A data.frame with columns fname, size, and url.
Expand Down
2 changes: 1 addition & 1 deletion R/item_rm.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#'@title Remove item from SB
#'
#'@param SB item ID
#'@param id item ID
#'@param session Session object from \code{\link{authenticate_sb}}
#'
#'@return TRUE to indicate success
Expand Down
4 changes: 2 additions & 2 deletions R/items_query.R → R/query_items.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
#'
#'@param query_list
#'
#'
#'
#'@param query_list List of item query selectors
#'@param session Session object from \code{\link{authenticate_sb}}
#'
#'
#'@export
Expand Down
9 changes: 9 additions & 0 deletions man/authenticate_sb.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,16 @@
\usage{
authenticate_sb(username, password)
}
\arguments{
\item{username}{Sciencebase username}

\item{password}{(optional) Sciencebase password, prompts user if not supplied}
}
\description{
This connects to SB, authenticates and gets a session token for
communicating with SB.
}
\details{

}

2 changes: 1 addition & 1 deletion man/item_append_files.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ item_append_files(id, files, session)

\item{files}{A file path to upload.}

\item{sb_session}{A ScienceBase session object from authenticate_sb.}
\item{session}{A ScienceBase session object from authenticate_sb.}
}
\value{
ScienceBase Item.
Expand Down
4 changes: 4 additions & 0 deletions man/item_create.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,16 @@ item_create(parent_id, title, session, info)
\arguments{
\item{parent_id}{ID of the parent item}

\item{title}{The title of the new SB item}

\item{session}{Authenticated session object (from \link{authenticate_sb})}

\item{info}{(optional) list of metadata info for the new item}
}
\value{
SB ID for the newly created item

x
}
\description{
Create a new SB item
Expand Down
2 changes: 2 additions & 0 deletions man/item_file_download.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ item_file_download(id, names, destinations, dest_dir, session = NULL,
\item{dest_dir}{A directory path for saving files when \code{names} parameter is omitted}

\item{session}{Session object from \code{\link{authenticate_sb}}}

\item{overwrite_file}{Boolean indicating if file should be overwritten if it already exists locally}
}
\description{
Function to downlod files attached to an item on SB. Either files can be specified directly
Expand Down
2 changes: 1 addition & 1 deletion man/item_list_files.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ item_list_files(id, session = NULL)
\arguments{
\item{id}{item ID}

\item{Session}{Session object from \link{authenticate_sb}}
\item{session}{Session object from \link{authenticate_sb}}
}
\value{
A data.frame with columns fname, size, and url.
Expand Down
4 changes: 2 additions & 2 deletions man/item_rm.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
item_rm(id, session)
}
\arguments{
\item{session}{Session object from \code{\link{authenticate_sb}}}
\item{id}{item ID}

\item{SB}{item ID}
\item{session}{Session object from \code{\link{authenticate_sb}}}
}
\value{
TRUE to indicate success
Expand Down
6 changes: 5 additions & 1 deletion man/query_items.Rd
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
% Generated by roxygen2 (4.1.0): do not edit by hand
% Please edit documentation in R/items_query.R
% Please edit documentation in R/query_items.R
\name{query_items}
\alias{query_items}
\title{Query SB for items using generic query parameters}
Expand All @@ -8,6 +8,10 @@ query_items(query_list, session)
}
\arguments{
\item{query_list}{}

\item{session}{Session object from \code{\link{authenticate_sb}}}

\item{query_list}{List of item query selectors}
}
\description{

Expand Down

0 comments on commit 4c4debe

Please sign in to comment.