## Startup functions and global constants
###############################################################################
kCertBundle <- "certificateBundle/cacert.pem"
.onLoad <- function(libname, pkgname){
## SET GITHUB CACHE AND START OPTIONS
.setGithubCache("opts", list())
.setGithubCache("githubEndpoint", "https://api.github.com/")
.setGithubCache("httpheader", character())
.setGithubCache("Accept", "application/json")
.setGithubCache("User-Agent", .userAgent())
.setGithubCache("low.speed.time", 60)
.setGithubCache("low.speed.limit", 1)
.setGithubCache("connecttimeout", 300)
.setGithubCache("followlocation", TRUE)
.setGithubCache("ssl.verifypeer", TRUE)
.setGithubCache("verbose", FALSE)
.setGithubCache("cainfo", file.path(libname, pkgname, kCertBundle))
}
.userAgent <- function(){
return(paste("rGithubClient", utils::packageDescription("rGithubClient", fields="Version"), sep="/"))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.