Browse Source

Improve docs slightly

master
Lukas Burk 1 year ago
parent
commit
9a1bdcb084
Signed by: lukas <lukas@quantenbrot.de> GPG Key ID: 044E8B20BB186F81
22 changed files with 51 additions and 21 deletions
  1. +1
    -0
      NAMESPACE
  2. +2
    -1
      NEWS.md
  3. +2
    -2
      R/get_games.R
  4. +1
    -1
      R/get_leaderboard.R
  5. +1
    -1
      R/get_platforms.R
  6. +1
    -1
      R/get_regions.R
  7. +1
    -1
      R/get_runs.R
  8. +1
    -1
      R/get_users.R
  9. +1
    -1
      R/get_variables.R
  10. +4
    -0
      R/speedrunr-package.R
  11. +2
    -2
      R/utils.R
  12. +1
    -1
      man/add_miscdata.Rd
  13. +1
    -1
      man/find_records.Rd
  14. +1
    -1
      man/get_games.Rd
  15. +1
    -1
      man/get_leaderboard.Rd
  16. +1
    -1
      man/get_platforms.Rd
  17. +1
    -1
      man/get_regions.Rd
  18. +1
    -1
      man/get_runs.Rd
  19. +1
    -1
      man/get_user.Rd
  20. +1
    -1
      man/get_variable.Rd
  21. +24
    -0
      man/speedrunr-package.Rd
  22. +1
    -1
      speedrunr.Rproj

+ 1
- 0
NAMESPACE View File

@@ -18,3 +18,4 @@ export(sr_get)
import(dplyr)
importFrom(purrr,map_chr)
importFrom(purrr,pluck)
importFrom(tibble,tibble)

+ 2
- 1
NEWS.md View File

@@ -1,5 +1,6 @@
# speedrunr 0.2.9000
# speedrunr 0.2.0.9000

* Improved documentation
* Organizational:
- Add travis
- Auto-deploy pkgdown site via travis


+ 2
- 2
R/get_games.R View File

@@ -5,14 +5,14 @@
#' If this is set, `name` will be ignored.
#' @param ... Other named parameters passed to the API.
#'
#' @return A [tibble::tibble] with search results
#' @return A [tibble][tibble::tibble-package] with search results
#' @export
#' @source <https://github.com/speedruncomorg/api/blob/master/version1/games.md#get-games>
#' @examples
#' \dontrun{
#' # Get all games matching Ocarina of Time
#' get_games(name = "Ocarina of Time")
#'
#'
#' # Or directly if you know its abbreviation is oot:
#' get_games(abbreviation = "oot")
#' }


+ 1
- 1
R/get_leaderboard.R View File

@@ -6,7 +6,7 @@
#' @param top `[100]`. How many places to return. Note there might be multiple runs per place.
#' @param ... Optional arguments to the API.
#'
#' @return A [tibble::tibble] of length `top` with run data.
#' @return A [tibble][tibble::tibble-package] of length `top` with run data.
#' @export
#'
#' @examples


+ 1
- 1
R/get_platforms.R View File

@@ -2,7 +2,7 @@
#'
#' @param id Optional `id` of a specific platform, normally all platforms are returned.
#' @inheritParams get_regions
#' @return A [tibble::tibble] with platform info and ids.
#' @return A [tibble][tibble::tibble-package] with platform info and ids.
#' @export
#' @source <https://github.com/speedruncomorg/api/blob/master/version1/platforms.md>
#' @note Currently the `released` variables is dropped on `list` output because I am bad at lists.


+ 1
- 1
R/get_regions.R View File

@@ -2,7 +2,7 @@
#'
#' @param id Optional `id` of a specific region, normally all regions are returned.
#' @param output Return a `df` (default) or named `list`.
#' @return A [tibble::tibble] of region `id` and `name`.
#' @return A [tibble][tibble::tibble-package] of region `id` and `name`.
#' @export
#' @source <https://github.com/speedruncomorg/api/blob/master/version1/regions.md>
#'


+ 1
- 1
R/get_runs.R View File

@@ -9,7 +9,7 @@
#' This option will probably not stick around for long.
#' @param ... Optional arguments passed to API.
#'
#' @return A [tibble::tibble] of runs.
#' @return A [tibble][tibble::tibble-package] of runs.
#' @export
#' @source <https://github.com/speedruncomorg/api/blob/master/version1/runs.md#get-runs>
#' @examples


+ 1
- 1
R/get_users.R View File

@@ -3,7 +3,7 @@
#' @param id The user id, e.g. `"e8e5v680"` for *zfg*.
#' @param ... Optional parameters for the api.
#'
#' @return A [tibble::tibble] with one row.
#' @return A [tibble][tibble::tibble-package] with one row.
#' @export
#'
#' @examples


+ 1
- 1
R/get_variables.R View File

@@ -6,7 +6,7 @@
#' yielding a flat tbl without nesting.
#' @param ... Optional arguments passed to the API.
#'
#' @return A [tibble::tibble] with the same number of rows as the variable has values if
#' @return A [tibble][tibble::tibble-package] with the same number of rows as the variable has values if
#' `list_column` is `FALSE`, otherwise a single-row tbl with a list-column.
#' @export
#' @source <https://github.com/speedruncomorg/api/blob/master/version1/variables.md>


+ 4
- 0
R/speedrunr-package.R View File

@@ -0,0 +1,4 @@
#' @keywords internal
#' @importFrom tibble tibble
"_PACKAGE"


+ 2
- 2
R/utils.R View File

@@ -4,7 +4,7 @@
#' @param by Variable that determines record status, either `date` (default) for the date of
#' the run, or `submitted` for the time the run was submitted to speedrun.com.
#'
#' @return A modified `runs` tbl with a boolean `record` variable.
#' @return A modified `runs` [tibble][tibble::tibble-package] with a boolean `record` variable.
#' @export
#'
#' @examples
@@ -56,7 +56,7 @@ is_outlier <- function(x, method = "quantile", direction = "upper") {
#'
#' @param runs A `tbl` of runs as returned by `get_runs` or `get_leaderboards`
#' @param platforms,regions The platform/region data to use. Uses packaged datasets by default.
#' @return The input `runs` tbl with resolved `system_`* variables and/or `player_name` column.
#' @return The input `runs` [tibble][tibble::tibble-package] with resolved `system_`* variables and/or `player_name` column.
#' @export
#' @import dplyr
#' @examples


+ 1
- 1
man/add_miscdata.Rd View File

@@ -18,7 +18,7 @@ add_players(runs)
\item{platforms, regions}{The platform/region data to use. Uses packaged datasets by default.}
}
\value{
The input \code{runs} tbl with resolved \code{system_}* variables and/or \code{player_name} column.
The input \code{runs} \link[tibble:tibble-package]{tibble} with resolved \code{system_}* variables and/or \code{player_name} column.
}
\description{
Join Platform/Region info to Runs


+ 1
- 1
man/find_records.Rd View File

@@ -13,7 +13,7 @@ find_records(runs, by = "date")
the run, or \code{submitted} for the time the run was submitted to speedrun.com.}
}
\value{
A modified \code{runs} tbl with a boolean \code{record} variable.
A modified \code{runs} \link[tibble:tibble-package]{tibble} with a boolean \code{record} variable.
}
\description{
Classify Runs as WR


+ 1
- 1
man/get_games.Rd View File

@@ -18,7 +18,7 @@ If this is set, \code{name} will be ignored.}
\item{...}{Other named parameters passed to the API.}
}
\value{
A \link[tibble:tibble]{tibble::tibble} with search results
A \link[tibble:tibble-package]{tibble} with search results
}
\description{
Search for Games by Name


+ 1
- 1
man/get_leaderboard.Rd View File

@@ -18,7 +18,7 @@ get_leaderboard(game, category, level = NULL, top = 100, ...)
\item{...}{Optional arguments to the API.}
}
\value{
A \link[tibble:tibble]{tibble::tibble} of length \code{top} with run data.
A \link[tibble:tibble-package]{tibble} of length \code{top} with run data.
}
\description{
Get A Leaderboard


+ 1
- 1
man/get_platforms.Rd View File

@@ -15,7 +15,7 @@ get_platforms(id = NULL, output = "df")
\item{output}{Return a \code{df} (default) or named \code{list}.}
}
\value{
A \link[tibble:tibble]{tibble::tibble} with platform info and ids.
A \link[tibble:tibble-package]{tibble} with platform info and ids.
}
\description{
Get Platforms


+ 1
- 1
man/get_regions.Rd View File

@@ -15,7 +15,7 @@ get_regions(id = NULL, output = "df")
\item{output}{Return a \code{df} (default) or named \code{list}.}
}
\value{
A \link[tibble:tibble]{tibble::tibble} of region \code{id} and \code{name}.
A \link[tibble:tibble-package]{tibble} of region \code{id} and \code{name}.
}
\description{
Get Regions


+ 1
- 1
man/get_runs.Rd View File

@@ -27,7 +27,7 @@ This option will probably not stick around for long.}
\item{...}{Optional arguments passed to API.}
}
\value{
A \link[tibble:tibble]{tibble::tibble} of runs.
A \link[tibble:tibble-package]{tibble} of runs.
}
\description{
Get All Runs Within a Game's Category


+ 1
- 1
man/get_user.Rd View File

@@ -12,7 +12,7 @@ get_user(id, ...)
\item{...}{Optional parameters for the api.}
}
\value{
A \link[tibble:tibble]{tibble::tibble} with one row.
A \link[tibble:tibble-package]{tibble} with one row.
}
\description{
Get a Single User by ID


+ 1
- 1
man/get_variable.Rd View File

@@ -19,7 +19,7 @@ yielding a flat tbl without nesting.}
\item{...}{Optional arguments passed to the API.}
}
\value{
A \link[tibble:tibble]{tibble::tibble} with the same number of rows as the variable has values if
A \link[tibble:tibble-package]{tibble} with the same number of rows as the variable has values if
\code{list_column} is \code{FALSE}, otherwise a single-row tbl with a list-column.
}
\description{


+ 24
- 0
man/speedrunr-package.Rd View File

@@ -0,0 +1,24 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/speedrunr-package.R
\docType{package}
\name{speedrunr-package}
\alias{speedrunr}
\alias{speedrunr-package}
\title{speedrunr: Access Data from 'speedrun.com'}
\description{
Wrappers for the 'speedrun.com' API to make it easy
to access run data.
}
\seealso{
Useful links:
\itemize{
\item \url{https://github.com/jemus42/speedrunr}
\item Report bugs at \url{https://github.com/jemus42/speedrunr/issues}
}

}
\author{
\strong{Maintainer}: Lukas Burk \email{lukas@quantenbrot.de} (0000-0001-7528-3795)

}
\keyword{internal}

+ 1
- 1
speedrunr.Rproj View File

@@ -17,4 +17,4 @@ StripTrailingWhitespace: Yes
BuildType: Package
PackageUseDevtools: Yes
PackageInstallArgs: --no-multiarch --with-keep.source
PackageRoxygenize: rd,collate,namespace,vignette
PackageRoxygenize: rd,collate,namespace

Loading…
Cancel
Save