Skip to content

Commit

Permalink
fix #32 moved to markdown docs
Browse files Browse the repository at this point in the history
  • Loading branch information
sckott committed Mar 24, 2017
1 parent 59dd184 commit 4cf6b14
Show file tree
Hide file tree
Showing 20 changed files with 198 additions and 197 deletions.
3 changes: 2 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@ Description: A simple HTTP client, with tools for making HTTP requests,
The package name is a play on curl, the widely used command line tool
for HTTP, and this package is built on top of the R package 'curl', an
interface to 'libcurl' (<https://curl.haxx.se/libcurl>).
Version: 0.3.2.9410
Version: 0.3.2.9413
License: MIT + file LICENSE
Authors@R: c(
person("Scott", "Chamberlain", role = c("aut", "cre"),
email = "myrmecocystus@gmail.com")
)
URL: https://github.com/ropensci/crul
BugReports: https://github.com/ropensci/crul/issues
Roxygen: list(markdown = TRUE)
Imports:
curl (>= 2.2),
R6 (>= 2.2.0),
Expand Down
18 changes: 9 additions & 9 deletions R/async.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,33 +6,33 @@
#' @param urls (character) one or more URLs (required)
#' @family async
#' @details
#' \strong{Methods}
#' **Methods**
#' \describe{
#' \item{\code{get(path, query, ...)}}{
#' \item{`get(path, query, ...)`}{
#' make async GET requests for all URLs
#' }
#' \item{\code{post(path, query, body, encode, ...)}}{
#' \item{`post(path, query, body, encode, ...)`}{
#' make async POST requests for all URLs
#' }
#' \item{\code{put(path, query, body, encode, ...)}}{
#' \item{`put(path, query, body, encode, ...)`}{
#' make async PUT requests for all URLs
#' }
#' \item{\code{patch(path, query, body, encode, ...)}}{
#' \item{`patch(path, query, body, encode, ...)`}{
#' make async PATCH requests for all URLs
#' }
#' \item{\code{delete(path, query, body, encode, ...)}}{
#' \item{`delete(path, query, body, encode, ...)`}{
#' make async DELETE requests for all URLs
#' }
#' \item{\code{head(path, ...)}}{
#' \item{`head(path, ...)`}{
#' make async HEAD requests for all URLs
#' }
#' }
#'
#' See \code{\link{HttpClient}} for information on parameters.
#' See [HttpClient()] for information on parameters.
#'
#' @format NULL
#' @usage NULL
#' @return a list, with objects of class \code{HttpResponse}
#' @return a list, with objects of class [HttpResponse()]
#' @examples \dontrun{
#' cc <- Async$new(
#' urls = c(
Expand Down
20 changes: 10 additions & 10 deletions R/asyncvaried.R
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
#' Async client for different request types
#'
#' @export
#' @param ...,.list Any number of objects of class \code{\link{HttpRequest}},
#' @param ...,.list Any number of objects of class [HttpRequest()],
#' must supply inputs to one of these parameters, but not both
#' @family async
#' @return An object of class \code{AsyncVaried} with variables and methods
#' @return An object of class `AsyncVaried` with variables and methods
#' @details
#' \strong{Methods}
#' **Methods**
#' \describe{
#' \item{\code{request()}}{
#' \item{`request()`}{
#' execute asynchronous requests
#' }
#' \item{\code{requests()}}{
#' \item{`requests()`}{
#' list requests
#' }
#' \item{\code{parse(encoding = "UTF-8")}}{
#' \item{`parse(encoding = "UTF-8")`}{
#' parse content
#' }
#' \item{\code{status_code()}}{
#' \item{`status_code()`}{
#' (integer) HTTP status codes
#' }
#' \item{\code{status()}}{
#' \item{`status()`}{
#' (list) HTTP status objects
#' }
#' \item{\code{content()}}{
#' \item{`content()`}{
#' raw content
#' }
#' \item{\code{times()}}{
#' \item{`times()`}{
#' curl request times
#' }
#' }
Expand Down
24 changes: 12 additions & 12 deletions R/client.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,24 @@
#' @export
#' @template args
#' @details
#' \strong{Methods}
#' **Methods**
#' \describe{
#' \item{\code{get(path, query, disk, stream, ...)}}{
#' \item{`get(path, query, disk, stream, ...)`}{
#' Make a GET request
#' }
#' \item{\code{post(path, query, body, disk, stream, ...)}}{
#' \item{`post(path, query, body, disk, stream, ...)`}{
#' Make a POST request
#' }
#' \item{\code{put(path, query, body, disk, stream, ...)}}{
#' \item{`put(path, query, body, disk, stream, ...)`}{
#' Make a PUT request
#' }
#' \item{\code{patch(path, query, body, disk, stream, ...)}}{
#' \item{`patch(path, query, body, disk, stream, ...)`}{
#' Make a PATCH request
#' }
#' \item{\code{delete(path, query, body, disk, stream, ...)}}{
#' \item{`delete(path, query, body, disk, stream, ...)`}{
#' Make a DELETE request
#' }
#' \item{\code{head(path, disk, stream, ...)}}{
#' \item{`head(path, disk, stream, ...)`}{
#' Make a HEAD request
#' }
#' }
Expand All @@ -34,17 +34,17 @@
#' \item body - body as an R list
#' \item encode - one of form, multipart, json, or raw
#' \item disk - a path to write to. if NULL (default), memory used.
#' See \code{\link[curl]{curl_fetch_disk}} for help.
#' See [curl::curl_fetch_disk()] for help.
#' \item stream - an R function to determine how to stream data. if
#' NULL (default), memory used. See \code{\link[curl]{curl_fetch_stream}}
#' NULL (default), memory used. See [curl::curl_fetch_stream()]
#' for help
#' \item ... curl options, only those in the acceptable set from
#' \code{\link[curl]{curl_options}} except the following: httpget, httppost,
#' [curl::curl_options()] except the following: httpget, httppost,
#' post, postfields, postfieldsize, and customrequest
#' }
#'
#' @seealso \code{\link{post-requests}}, \code{\link{delete-requests}},
#' \code{\link{http-headers}}, \code{\link{writing-options}}
#' @seealso [post-requests], [delete-requests], [http-headers],
#' [writing-options]
#'
#' @examples
#' (x <- HttpClient$new(url = "https://httpbin.org"))
Expand Down
16 changes: 8 additions & 8 deletions R/crul-package.r
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
#' \strong{HTTP R client}
#' **HTTP R client**
#'
#' @section Package API:
#' \itemize{
#' \item \code{\link{HttpClient}} - create a connection client, set all
#' \item [HttpClient()] - create a connection client, set all
#' your http options, make http requests
#' \item \code{\link{HttpResponse}} - mostly for internal use, handles
#' \item [HttpResponse()] - mostly for internal use, handles
#' http responses
#' \item \code{\link{HttpRequest}} - generate an HTTP request, mostly for
#' use in building requests to be used in \code{Async} or \code{AsyncVaried}
#' \item \code{\link{Async}} - asynchronous requests
#' \item \code{\link{AsyncVaried}} - varied asynchronous requests
#' \item [HttpRequest()] - generate an HTTP request, mostly for
#' use in building requests to be used in `Async` or `AsyncVaried`
#' \item [Async()] - asynchronous requests
#' \item [AsyncVaried()] - varied asynchronous requests
#' }
#'
#' @section HTTP conditions:
#' We use \code{fauxpas} if you have it installed for handling HTTP
#' We use `fauxpas` if you have it installed for handling HTTP
#' conditions but if it's not installed we use \pkg{httpcode}
#'
#' @import curl
Expand Down
4 changes: 2 additions & 2 deletions R/curl-options.R
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#' curl options
#'
#' With the \code{opts} parameter you can pass in various
#' With the `opts` parameter you can pass in various
#' curl options, including user agent string, whether to get verbose
#' curl output or not, setting a timeout for requests, and more. See
#' \code{\link[curl]{curl_options}} for all the options you can use.
#' [curl::curl_options()] for all the options you can use.
#'
#' A progress helper will be coming soon.
#'
Expand Down
2 changes: 1 addition & 1 deletion R/handle.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#'
#' @export
#' @param url (character) A url. required.
#' @param ... options passed on to \code{\link[curl]{new_handle}}
#' @param ... options passed on to [curl::new_handle()]
#' @examples
#' handle("https://httpbin.org")
#'
Expand Down
24 changes: 12 additions & 12 deletions R/httprequest.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,37 +2,37 @@
#'
#' @export
#' @template args
#' @seealso \code{\link{post-requests}}, \code{\link{delete-requests}},
#' \code{\link{http-headers}}, \code{\link{writing-options}}
#' @seealso [post-requests], [delete-requests],
#' [http-headers], [writing-options]
#'
#' @details This R6 class doesn't do actual HTTP requests as does
#' \code{\link{HttpClient}} - but is for building requests
#' to use for async HTTP requests in \code{\link{AsyncVaried}}
#' [HttpClient()] - but is for building requests
#' to use for async HTTP requests in [AsyncVaried()]
#
#'
#' \strong{Methods}
#' **Methods**
#' \describe{
#' \item{\code{get(path, query, disk, stream, ...)}}{
#' \item{`get(path, query, disk, stream, ...)`}{
#' Define a GET request
#' }
#' \item{\code{post(path, query, body, disk, stream, ...)}}{
#' \item{`post(path, query, body, disk, stream, ...)`}{
#' Define a POST request
#' }
#' \item{\code{put(path, query, body, disk, stream, ...)}}{
#' \item{`put(path, query, body, disk, stream, ...)`}{
#' Define a PUT request
#' }
#' \item{\code{patch(path, query, body, disk, stream, ...)}}{
#' \item{`patch(path, query, body, disk, stream, ...)`}{
#' Define a PATCH request
#' }
#' \item{\code{delete(path, query, body, disk, stream, ...)}}{
#' \item{`delete(path, query, body, disk, stream, ...)`}{
#' Define a DELETE request
#' }
#' \item{\code{head(path, disk, stream, ...)}}{
#' \item{`head(path, disk, stream, ...)`}{
#' Define a HEAD request
#' }
#' }
#'
#' See \code{\link{HttpClient}} for information on parameters.
#' See [HttpClient()] for information on parameters.
#'
#' @format NULL
#' @usage NULL
Expand Down
2 changes: 1 addition & 1 deletion R/make_url.R
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ add_query <- function(x, url) {
#' @param url (character) a url
#' @param path (character) a path
#' @param query (list) a named list of query parameters
#' @return \code{url_build} returns a character string URL; \code{url_parse}
#' @return `url_build` returns a character string URL; `url_parse`
#' returns a list with URL components
#' @examples
#' url_build("https://httpbin.org")
Expand Down
2 changes: 1 addition & 1 deletion R/proxies.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#' @param auth (character) authentication type, one of basic (default),
#' digest, digest_ie, gssnegotiate, ntlm, or any. optional
#'
#' @details See http://proxylist.hidemyass.com/ for a list of proxies you
#' @details See <http://proxylist.hidemyass.com/> for a list of proxies you
#' can use
#'
#' @examples
Expand Down
12 changes: 6 additions & 6 deletions R/response.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,22 @@
#' @param opts (list) curl options
#' @param handle A handle
#' @details
#' \strong{Methods}
#' **Methods**
#' \describe{
#' \item{\code{parse()}}{
#' \item{`parse()`}{
#' Parse the raw response content to text
#' }
#' \item{\code{success()}}{
#' \item{`success()`}{
#' Was status code less than or equal to 201.
#' returns boolean
#' }
#' \item{\code{status_http()}}{
#' \item{`status_http()`}{
#' Get HTTP status code, message, and explanation
#' }
#' \item{\code{raise_for_status()}}{
#' \item{`raise_for_status()`}{
#' Check HTTP status and stop with appropriate
#' HTTP error code and message if >= 300.
#' - If you have \code{fauxpas} installed we use that,
#' - If you have `fauxpas` installed we use that,
#' otherwise use \pkg{httpcode}
#' }
#' }
Expand Down
44 changes: 22 additions & 22 deletions man/Async.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 4cf6b14

Please sign in to comment.