Skip to contents

Paths to GitHub data as JSON and XML

Usage

gh_users_json()

gh_repos_json()

gh_users_xml()

gh_repos_xml()

Value

Local path to JSON or XML file containing GitHub data

See also

Other GitHub data and functions: gh_repos, gh_users

Examples

gh_users_json()
#> [1] "/home/runner/work/_temp/Library/repurrrsive/extdata/gh_users.json"
if (require("jsonlite")) {
  ghuj <- fromJSON(gh_users_json(), simplifyDataFrame = FALSE)
  identical(gh_users, ghuj)
}
#> [1] TRUE
gh_repos_json()
#> [1] "/home/runner/work/_temp/Library/repurrrsive/extdata/gh_repos.json"
if (require("jsonlite")) {
  ghrj <- fromJSON(gh_repos_json(), simplifyDataFrame = FALSE)
  identical(gh_repos, ghrj)
}
#> [1] TRUE
gh_users_xml()
#> [1] "/home/runner/work/_temp/Library/repurrrsive/extdata/gh_users.xml"
if (require("xml2")) {
  xml <- read_xml(gh_users_xml())
  xml
}
#> Loading required package: xml2
#> {xml_document}
#> <root>
#> [1] <elem>\n  <login>gaborcsardi</login>\n  <id>660288</id>\n  <avatar_url>ht ...
#> [2] <elem>\n  <login>jennybc</login>\n  <id>599454</id>\n  <avatar_url>https: ...
#> [3] <elem>\n  <login>jtleek</login>\n  <id>1571674</id>\n  <avatar_url>https: ...
#> [4] <elem>\n  <login>juliasilge</login>\n  <id>12505835</id>\n  <avatar_url>h ...
#> [5] <elem>\n  <login>leeper</login>\n  <id>3505428</id>\n  <avatar_url>https: ...
#> [6] <elem>\n  <login>masalmon</login>\n  <id>8360597</id>\n  <avatar_url>http ...
gh_repos_xml()
#> [1] "/home/runner/work/_temp/Library/repurrrsive/extdata/gh_repos.xml"
if (require("xml2")) {
  xml <- read_xml(gh_repos_xml())
  xml
}
#> {xml_document}
#> <root>
#> [1] <elem>\n  <elem>\n    <id>61160198</id>\n    <name>after</name>\n    <ful ...
#> [2] <elem>\n  <elem>\n    <id>14756210</id>\n    <name>2013-11_sfu</name>\n   ...
#> [3] <elem>\n  <elem>\n    <id>41645119</id>\n    <name>advdatasci</name>\n    ...
#> [4] <elem>\n  <elem>\n    <id>56019902</id>\n    <name>2016-14</name>\n    <f ...
#> [5] <elem>\n  <elem>\n    <id>17120350</id>\n    <name>ampolcourse</name>\n   ...
#> [6] <elem>\n  <elem>\n    <id>57878579</id>\n    <name>aqi_pdf</name>\n    <f ...