-
Notifications
You must be signed in to change notification settings - Fork 8
/
GitHub-API.Rd
101 lines (82 loc) · 3.02 KB
/
GitHub-API.Rd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/github.R
\name{GitHub-API}
\alias{GitHub-API}
\alias{github_commits}
\alias{github_branches}
\alias{github_issues}
\title{GitHub API}
\usage{
github_commits(user = "r-lum", repo = "luminescence", branch = "master", n = 5)
github_branches(user = "r-lum", repo = "luminescence")
github_issues(user = "r-lum", repo = "luminescence", verbose = TRUE)
}
\arguments{
\item{user}{\link{character} (\emph{with default}):
GitHub user name (defaults to \code{'r-lum'}).}
\item{repo}{\link{character} (\emph{with default}):
name of a GitHub repository (defaults to \code{'luminescence'}).}
\item{branch}{\link{character} (\emph{with default}):
branch of a GitHub repository (defaults to \code{'master'}).}
\item{n}{\link{integer} (\emph{with default}):
number of commits returned (defaults to 5).}
\item{verbose}{\link{logical} (\emph{with default}):
print the output to the console (defaults to \code{TRUE}).}
}
\value{
\code{github_commits}: \link{data.frame} with columns:
\tabular{ll}{
\verb{[ ,1]} \tab SHA \cr
\verb{[ ,2]} \tab AUTHOR \cr
\verb{[ ,3]} \tab DATE \cr
\verb{[ ,4]} \tab MESSAGE \cr
}
\code{github_branches}: \link{data.frame} with columns:
\tabular{ll}{
\verb{[ ,1]} \tab BRANCH \cr
\verb{[ ,2]} \tab SHA \cr
\verb{[ ,3]} \tab INSTALL \cr
}
\code{github_commits}: Nested \link{list} with \code{n} elements.
Each commit element is a list with elements:
\tabular{ll}{
\verb{[[1]]} \tab NUMBER \cr
\verb{[[2]]} \tab TITLE \cr
\verb{[[3]]} \tab BODY \cr
\verb{[[4]]} \tab CREATED \cr
\verb{[[5]]} \tab UPDATED \cr
\verb{[[6]]} \tab CREATOR \cr
\verb{[[7]]} \tab URL \cr
\verb{[[8]]} \tab STATUS \cr
}
}
\description{
R Interface to the GitHub API v3.
}
\details{
These functions can be used to query a specific repository hosted on GitHub. \cr
\code{github_commits} lists the most recent \code{n} commits of a specific branch of a repository.
\code{github_branches} can be used to list all current branches of a
repository and returns the corresponding SHA hash as well as an installation
command to install the branch in R via the 'devtools' package.
\code{github_issues} lists all open issues for a repository in valid YAML.
}
\section{Function version}{
0.1.0
}
\examples{
\dontrun{
github_branches(user = "r-lum", repo = "luminescence")
github_issues(user = "r-lum", repo = "luminescence")
github_commits(user = "r-lum", repo = "luminescence", branch = "master", n = 10)
}
}
\section{How to cite}{
Burow, C., 2024. GitHub-API(): GitHub API. Function version 0.1.0. In: Kreutzer, S., Burow, C., Dietze, M., Fuchs, M.C., Schmidt, C., Fischer, M., Friedrich, J., Mercier, N., Philippe, A., Riedesel, S., Autzen, M., Mittelstrass, D., Gray, H.J., Galharret, J., Colombo, M., 2024. Luminescence: Comprehensive Luminescence Dating Data Analysis. R package version 0.9.25. https://r-lum.github.io/Luminescence/
}
\references{
GitHub Developer API v3. \url{https://docs.github.com/v3/}, last accessed: 10/01/2017.
}
\author{
Christoph Burow, University of Cologne (Germany)
, RLum Developer Team}