Skip to content

Instantly share code, notes, and snippets.

@scripting
Last active September 12, 2018 02:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save scripting/c34f50f2c8e6b995f4f5c71da30bc44f to your computer and use it in GitHub Desktop.
Save scripting/c34f50f2c8e6b995f4f5c71da30bc44f to your computer and use it in GitHub Desktop.
Getting the contents of a GitHub repository using the contents API
{
"name": "repocontents",
"description": "Code to get the contents of a respository.",
"author": "Dave Winer <dave@smallpicture.com>",
"version": "0.4.0",
"main": "repocontents.js",
"scripts": {
"start": "node repocontents.js"
},
"dependencies" : {
"request": "*",
"daveutils": "*"
},
"license": "MIT",
"engines": {
"node": "*"
}
}
const fs = require ("fs");
const utils = require ("daveutils");
const request = require ("request");
var config = {
username: "scripting",
repo: "test1",
committer: {
name: "Dave Winer",
email: "dave.winer@gmail.com"
},
message: "repocontents",
userAgent: "repocontents",
};
function getRepoContents (options, path, callback) {
function loadDirectory (theArray, parentpath, callback) {
function nextFile (ix) {
if (ix < theArray.length) {
var item = theArray [ix];
if (item.type == "dir") {
getRepoContents (options, item.path, function (err, jstruct) {
if (jstruct !== undefined) { //no error
item.subs = jstruct;
}
nextFile (ix + 1);
});
}
else {
nextFile (ix + 1);
}
}
else {
callback ();
}
}
nextFile (0);
}
if (utils.beginsWith (path, "/")) {
path = utils.stringDelete (path, 1, 1);
}
var theRequest = {
method: "GET",
url: "https://api.github.com/repos/" + options.username + "/" + options.repo + "/contents/" + path,
headers: {
"User-Agent": options.userAgent
}
};
console.log ("getRepoContents: theRequest == " + utils.jsonStringify (theRequest));
request (theRequest, function (err, response, body) {
if (err) {
if (callback !== undefined) {
callback (err);
}
}
else {
try {
var jstruct = JSON.parse (body);
if (Array.isArray (jstruct)) { //it's a directory
loadDirectory (jstruct, path, function () {
callback (undefined, jstruct);
});
}
else {
if (callback !== undefined) {
callback (undefined, jstruct);
}
}
}
catch (err) {
if (callback !== undefined) {
callback (err);
}
}
}
});
}
var whenstart = new Date ();
getRepoContents (config, "/", function (err, jstruct) {
if (err) {
console.log ("err.message == " + err.message);
}
else {
var jsontext = utils.jsonStringify (jstruct);
console.log ("jstruct == " + jsontext);
console.log (utils.secondsSince (whenstart) + " secs.");
fs.writeFile ("tree.json", jsontext, function () {
});
}
});
[
{
"name": "LICENSE",
"path": "LICENSE",
"sha": "5be822d15b7f1c4023ad56ffc7bcfaa55917f3fd",
"size": 1067,
"url": "https://api.github.com/repos/scripting/test1/contents/LICENSE?ref=master",
"html_url": "https://github.com/scripting/test1/blob/master/LICENSE",
"git_url": "https://api.github.com/repos/scripting/test1/git/blobs/5be822d15b7f1c4023ad56ffc7bcfaa55917f3fd",
"download_url": "https://raw.githubusercontent.com/scripting/test1/master/LICENSE",
"type": "file",
"_links": {
"self": "https://api.github.com/repos/scripting/test1/contents/LICENSE?ref=master",
"git": "https://api.github.com/repos/scripting/test1/git/blobs/5be822d15b7f1c4023ad56ffc7bcfaa55917f3fd",
"html": "https://github.com/scripting/test1/blob/master/LICENSE"
}
},
{
"name": "README.md",
"path": "README.md",
"sha": "e6f6b35146143114e85ef7f9e40463aab19de5ca",
"size": 7,
"url": "https://api.github.com/repos/scripting/test1/contents/README.md?ref=master",
"html_url": "https://github.com/scripting/test1/blob/master/README.md",
"git_url": "https://api.github.com/repos/scripting/test1/git/blobs/e6f6b35146143114e85ef7f9e40463aab19de5ca",
"download_url": "https://raw.githubusercontent.com/scripting/test1/master/README.md",
"type": "file",
"_links": {
"self": "https://api.github.com/repos/scripting/test1/contents/README.md?ref=master",
"git": "https://api.github.com/repos/scripting/test1/git/blobs/e6f6b35146143114e85ef7f9e40463aab19de5ca",
"html": "https://github.com/scripting/test1/blob/master/README.md"
}
},
{
"name": "blog",
"path": "blog",
"sha": "3c0ebbb5056ff996d56e82c62c50a7d4ae337f07",
"size": 0,
"url": "https://api.github.com/repos/scripting/test1/contents/blog?ref=master",
"html_url": "https://github.com/scripting/test1/tree/master/blog",
"git_url": "https://api.github.com/repos/scripting/test1/git/trees/3c0ebbb5056ff996d56e82c62c50a7d4ae337f07",
"download_url": null,
"type": "dir",
"_links": {
"self": "https://api.github.com/repos/scripting/test1/contents/blog?ref=master",
"git": "https://api.github.com/repos/scripting/test1/git/trees/3c0ebbb5056ff996d56e82c62c50a7d4ae337f07",
"html": "https://github.com/scripting/test1/tree/master/blog"
},
"subs": [
{
"name": "days",
"path": "blog/days",
"sha": "448d6da44079d839d073c766b1ae852c7b8d3db3",
"size": 0,
"url": "https://api.github.com/repos/scripting/test1/contents/blog/days?ref=master",
"html_url": "https://github.com/scripting/test1/tree/master/blog/days",
"git_url": "https://api.github.com/repos/scripting/test1/git/trees/448d6da44079d839d073c766b1ae852c7b8d3db3",
"download_url": null,
"type": "dir",
"_links": {
"self": "https://api.github.com/repos/scripting/test1/contents/blog/days?ref=master",
"git": "https://api.github.com/repos/scripting/test1/git/trees/448d6da44079d839d073c766b1ae852c7b8d3db3",
"html": "https://github.com/scripting/test1/tree/master/blog/days"
},
"subs": [
{
"name": "2018",
"path": "blog/days/2018",
"sha": "5b605a7a1446718032d6d49d0d2daf67b5d8003e",
"size": 0,
"url": "https://api.github.com/repos/scripting/test1/contents/blog/days/2018?ref=master",
"html_url": "https://github.com/scripting/test1/tree/master/blog/days/2018",
"git_url": "https://api.github.com/repos/scripting/test1/git/trees/5b605a7a1446718032d6d49d0d2daf67b5d8003e",
"download_url": null,
"type": "dir",
"_links": {
"self": "https://api.github.com/repos/scripting/test1/contents/blog/days/2018?ref=master",
"git": "https://api.github.com/repos/scripting/test1/git/trees/5b605a7a1446718032d6d49d0d2daf67b5d8003e",
"html": "https://github.com/scripting/test1/tree/master/blog/days/2018"
},
"subs": [
{
"name": "08",
"path": "blog/days/2018/08",
"sha": "b689de5bb3a7366fff354471089762d204230d33",
"size": 0,
"url": "https://api.github.com/repos/scripting/test1/contents/blog/days/2018/08?ref=master",
"html_url": "https://github.com/scripting/test1/tree/master/blog/days/2018/08",
"git_url": "https://api.github.com/repos/scripting/test1/git/trees/b689de5bb3a7366fff354471089762d204230d33",
"download_url": null,
"type": "dir",
"_links": {
"self": "https://api.github.com/repos/scripting/test1/contents/blog/days/2018/08?ref=master",
"git": "https://api.github.com/repos/scripting/test1/git/trees/b689de5bb3a7366fff354471089762d204230d33",
"html": "https://github.com/scripting/test1/tree/master/blog/days/2018/08"
},
"subs": [
{
"name": "21.json",
"path": "blog/days/2018/08/21.json",
"sha": "4514d0e811b8a3ae5f801428af7fd06cc30caf21",
"size": 3963,
"url": "https://api.github.com/repos/scripting/test1/contents/blog/days/2018/08/21.json?ref=master",
"html_url": "https://github.com/scripting/test1/blob/master/blog/days/2018/08/21.json",
"git_url": "https://api.github.com/repos/scripting/test1/git/blobs/4514d0e811b8a3ae5f801428af7fd06cc30caf21",
"download_url": "https://raw.githubusercontent.com/scripting/test1/master/blog/days/2018/08/21.json",
"type": "file",
"_links": {
"self": "https://api.github.com/repos/scripting/test1/contents/blog/days/2018/08/21.json?ref=master",
"git": "https://api.github.com/repos/scripting/test1/git/blobs/4514d0e811b8a3ae5f801428af7fd06cc30caf21",
"html": "https://github.com/scripting/test1/blob/master/blog/days/2018/08/21.json"
}
}
]
}
]
}
]
},
{
"name": "items",
"path": "blog/items",
"sha": "da95d125dec732ede492dd6d63ebdb13a9880008",
"size": 0,
"url": "https://api.github.com/repos/scripting/test1/contents/blog/items?ref=master",
"html_url": "https://github.com/scripting/test1/tree/master/blog/items",
"git_url": "https://api.github.com/repos/scripting/test1/git/trees/da95d125dec732ede492dd6d63ebdb13a9880008",
"download_url": null,
"type": "dir",
"_links": {
"self": "https://api.github.com/repos/scripting/test1/contents/blog/items?ref=master",
"git": "https://api.github.com/repos/scripting/test1/git/trees/da95d125dec732ede492dd6d63ebdb13a9880008",
"html": "https://github.com/scripting/test1/tree/master/blog/items"
},
"subs": [
{
"name": "2018",
"path": "blog/items/2018",
"sha": "473a68475e5cedd84e8cc89f154a087b9ef843fa",
"size": 0,
"url": "https://api.github.com/repos/scripting/test1/contents/blog/items/2018?ref=master",
"html_url": "https://github.com/scripting/test1/tree/master/blog/items/2018",
"git_url": "https://api.github.com/repos/scripting/test1/git/trees/473a68475e5cedd84e8cc89f154a087b9ef843fa",
"download_url": null,
"type": "dir",
"_links": {
"self": "https://api.github.com/repos/scripting/test1/contents/blog/items/2018?ref=master",
"git": "https://api.github.com/repos/scripting/test1/git/trees/473a68475e5cedd84e8cc89f154a087b9ef843fa",
"html": "https://github.com/scripting/test1/tree/master/blog/items/2018"
},
"subs": [
{
"name": "08",
"path": "blog/items/2018/08",
"sha": "4e07383d78534964d8126c90998569b1a1065163",
"size": 0,
"url": "https://api.github.com/repos/scripting/test1/contents/blog/items/2018/08?ref=master",
"html_url": "https://github.com/scripting/test1/tree/master/blog/items/2018/08",
"git_url": "https://api.github.com/repos/scripting/test1/git/trees/4e07383d78534964d8126c90998569b1a1065163",
"download_url": null,
"type": "dir",
"_links": {
"self": "https://api.github.com/repos/scripting/test1/contents/blog/items/2018/08?ref=master",
"git": "https://api.github.com/repos/scripting/test1/git/trees/4e07383d78534964d8126c90998569b1a1065163",
"html": "https://github.com/scripting/test1/tree/master/blog/items/2018/08"
},
"subs": [
{
"name": "21",
"path": "blog/items/2018/08/21",
"sha": "106c998cf4af15cf24b2fc2eeda950e9b24946e8",
"size": 0,
"url": "https://api.github.com/repos/scripting/test1/contents/blog/items/2018/08/21?ref=master",
"html_url": "https://github.com/scripting/test1/tree/master/blog/items/2018/08/21",
"git_url": "https://api.github.com/repos/scripting/test1/git/trees/106c998cf4af15cf24b2fc2eeda950e9b24946e8",
"download_url": null,
"type": "dir",
"_links": {
"self": "https://api.github.com/repos/scripting/test1/contents/blog/items/2018/08/21?ref=master",
"git": "https://api.github.com/repos/scripting/test1/git/trees/106c998cf4af15cf24b2fc2eeda950e9b24946e8",
"html": "https://github.com/scripting/test1/tree/master/blog/items/2018/08/21"
},
"subs": [
{
"name": "a131335.json",
"path": "blog/items/2018/08/21/a131335.json",
"sha": "ad4c0b63d9fc69096023cb105a735e8719f0e673",
"size": 1211,
"url": "https://api.github.com/repos/scripting/test1/contents/blog/items/2018/08/21/a131335.json?ref=master",
"html_url": "https://github.com/scripting/test1/blob/master/blog/items/2018/08/21/a131335.json",
"git_url": "https://api.github.com/repos/scripting/test1/git/blobs/ad4c0b63d9fc69096023cb105a735e8719f0e673",
"download_url": "https://raw.githubusercontent.com/scripting/test1/master/blog/items/2018/08/21/a131335.json",
"type": "file",
"_links": {
"self": "https://api.github.com/repos/scripting/test1/contents/blog/items/2018/08/21/a131335.json?ref=master",
"git": "https://api.github.com/repos/scripting/test1/git/blobs/ad4c0b63d9fc69096023cb105a735e8719f0e673",
"html": "https://github.com/scripting/test1/blob/master/blog/items/2018/08/21/a131335.json"
}
},
{
"name": "a133141.json",
"path": "blog/items/2018/08/21/a133141.json",
"sha": "b4a0809cfc05b04a7e8b1981633a2b92251eb5b4",
"size": 267,
"url": "https://api.github.com/repos/scripting/test1/contents/blog/items/2018/08/21/a133141.json?ref=master",
"html_url": "https://github.com/scripting/test1/blob/master/blog/items/2018/08/21/a133141.json",
"git_url": "https://api.github.com/repos/scripting/test1/git/blobs/b4a0809cfc05b04a7e8b1981633a2b92251eb5b4",
"download_url": "https://raw.githubusercontent.com/scripting/test1/master/blog/items/2018/08/21/a133141.json",
"type": "file",
"_links": {
"self": "https://api.github.com/repos/scripting/test1/contents/blog/items/2018/08/21/a133141.json?ref=master",
"git": "https://api.github.com/repos/scripting/test1/git/blobs/b4a0809cfc05b04a7e8b1981633a2b92251eb5b4",
"html": "https://github.com/scripting/test1/blob/master/blog/items/2018/08/21/a133141.json"
}
},
{
"name": "a134056.json",
"path": "blog/items/2018/08/21/a134056.json",
"sha": "33135275ade4e9cb54859b8f0a6534e13692ea17",
"size": 418,
"url": "https://api.github.com/repos/scripting/test1/contents/blog/items/2018/08/21/a134056.json?ref=master",
"html_url": "https://github.com/scripting/test1/blob/master/blog/items/2018/08/21/a134056.json",
"git_url": "https://api.github.com/repos/scripting/test1/git/blobs/33135275ade4e9cb54859b8f0a6534e13692ea17",
"download_url": "https://raw.githubusercontent.com/scripting/test1/master/blog/items/2018/08/21/a134056.json",
"type": "file",
"_links": {
"self": "https://api.github.com/repos/scripting/test1/contents/blog/items/2018/08/21/a134056.json?ref=master",
"git": "https://api.github.com/repos/scripting/test1/git/blobs/33135275ade4e9cb54859b8f0a6534e13692ea17",
"html": "https://github.com/scripting/test1/blob/master/blog/items/2018/08/21/a134056.json"
}
},
{
"name": "a144138.json",
"path": "blog/items/2018/08/21/a144138.json",
"sha": "909e7a8ca24724cbd0852feb34ea67ec69e97d63",
"size": 1762,
"url": "https://api.github.com/repos/scripting/test1/contents/blog/items/2018/08/21/a144138.json?ref=master",
"html_url": "https://github.com/scripting/test1/blob/master/blog/items/2018/08/21/a144138.json",
"git_url": "https://api.github.com/repos/scripting/test1/git/blobs/909e7a8ca24724cbd0852feb34ea67ec69e97d63",
"download_url": "https://raw.githubusercontent.com/scripting/test1/master/blog/items/2018/08/21/a144138.json",
"type": "file",
"_links": {
"self": "https://api.github.com/repos/scripting/test1/contents/blog/items/2018/08/21/a144138.json?ref=master",
"git": "https://api.github.com/repos/scripting/test1/git/blobs/909e7a8ca24724cbd0852feb34ea67ec69e97d63",
"html": "https://github.com/scripting/test1/blob/master/blog/items/2018/08/21/a144138.json"
}
}
]
}
]
}
]
}
]
},
{
"name": "misc",
"path": "blog/misc",
"sha": "fe4fef75287bdcc59fe19a343ccde43de6521c22",
"size": 0,
"url": "https://api.github.com/repos/scripting/test1/contents/blog/misc?ref=master",
"html_url": "https://github.com/scripting/test1/tree/master/blog/misc",
"git_url": "https://api.github.com/repos/scripting/test1/git/trees/fe4fef75287bdcc59fe19a343ccde43de6521c22",
"download_url": null,
"type": "dir",
"_links": {
"self": "https://api.github.com/repos/scripting/test1/contents/blog/misc?ref=master",
"git": "https://api.github.com/repos/scripting/test1/git/trees/fe4fef75287bdcc59fe19a343ccde43de6521c22",
"html": "https://github.com/scripting/test1/tree/master/blog/misc"
},
"subs": [
{
"name": "glossary.opml",
"path": "blog/misc/glossary.opml",
"sha": "07425609a796bafb4b717b7db2a6eb2ed52a9043",
"size": 15975,
"url": "https://api.github.com/repos/scripting/test1/contents/blog/misc/glossary.opml?ref=master",
"html_url": "https://github.com/scripting/test1/blob/master/blog/misc/glossary.opml",
"git_url": "https://api.github.com/repos/scripting/test1/git/blobs/07425609a796bafb4b717b7db2a6eb2ed52a9043",
"download_url": "https://raw.githubusercontent.com/scripting/test1/master/blog/misc/glossary.opml",
"type": "file",
"_links": {
"self": "https://api.github.com/repos/scripting/test1/contents/blog/misc/glossary.opml?ref=master",
"git": "https://api.github.com/repos/scripting/test1/git/blobs/07425609a796bafb4b717b7db2a6eb2ed52a9043",
"html": "https://github.com/scripting/test1/blob/master/blog/misc/glossary.opml"
}
},
{
"name": "motto.txt",
"path": "blog/misc/motto.txt",
"sha": "7ccf38a9f17304cab978bcb724a9b7551009dbc9",
"size": 21,
"url": "https://api.github.com/repos/scripting/test1/contents/blog/misc/motto.txt?ref=master",
"html_url": "https://github.com/scripting/test1/blob/master/blog/misc/motto.txt",
"git_url": "https://api.github.com/repos/scripting/test1/git/blobs/7ccf38a9f17304cab978bcb724a9b7551009dbc9",
"download_url": "https://raw.githubusercontent.com/scripting/test1/master/blog/misc/motto.txt",
"type": "file",
"_links": {
"self": "https://api.github.com/repos/scripting/test1/contents/blog/misc/motto.txt?ref=master",
"git": "https://api.github.com/repos/scripting/test1/git/blobs/7ccf38a9f17304cab978bcb724a9b7551009dbc9",
"html": "https://github.com/scripting/test1/blob/master/blog/misc/motto.txt"
}
},
{
"name": "motto.xml",
"path": "blog/misc/motto.xml",
"sha": "5de72d73a3ea71ec0cb02f8da85571c494a44d4b",
"size": 35,
"url": "https://api.github.com/repos/scripting/test1/contents/blog/misc/motto.xml?ref=master",
"html_url": "https://github.com/scripting/test1/blob/master/blog/misc/motto.xml",
"git_url": "https://api.github.com/repos/scripting/test1/git/blobs/5de72d73a3ea71ec0cb02f8da85571c494a44d4b",
"download_url": "https://raw.githubusercontent.com/scripting/test1/master/blog/misc/motto.xml",
"type": "file",
"_links": {
"self": "https://api.github.com/repos/scripting/test1/contents/blog/misc/motto.xml?ref=master",
"git": "https://api.github.com/repos/scripting/test1/git/blobs/5de72d73a3ea71ec0cb02f8da85571c494a44d4b",
"html": "https://github.com/scripting/test1/blob/master/blog/misc/motto.xml"
}
},
{
"name": "motto1.xml",
"path": "blog/misc/motto1.xml",
"sha": "d719304aeed78902f487ae433085f7efc0598560",
"size": 62,
"url": "https://api.github.com/repos/scripting/test1/contents/blog/misc/motto1.xml?ref=master",
"html_url": "https://github.com/scripting/test1/blob/master/blog/misc/motto1.xml",
"git_url": "https://api.github.com/repos/scripting/test1/git/blobs/d719304aeed78902f487ae433085f7efc0598560",
"download_url": "https://raw.githubusercontent.com/scripting/test1/master/blog/misc/motto1.xml",
"type": "file",
"_links": {
"self": "https://api.github.com/repos/scripting/test1/contents/blog/misc/motto1.xml?ref=master",
"git": "https://api.github.com/repos/scripting/test1/git/blobs/d719304aeed78902f487ae433085f7efc0598560",
"html": "https://github.com/scripting/test1/blob/master/blog/misc/motto1.xml"
}
},
{
"name": "motto2.xml",
"path": "blog/misc/motto2.xml",
"sha": "3b5018fd346ca570b18671437438c544ecd89674",
"size": 99356,
"url": "https://api.github.com/repos/scripting/test1/contents/blog/misc/motto2.xml?ref=master",
"html_url": "https://github.com/scripting/test1/blob/master/blog/misc/motto2.xml",
"git_url": "https://api.github.com/repos/scripting/test1/git/blobs/3b5018fd346ca570b18671437438c544ecd89674",
"download_url": "https://raw.githubusercontent.com/scripting/test1/master/blog/misc/motto2.xml",
"type": "file",
"_links": {
"self": "https://api.github.com/repos/scripting/test1/contents/blog/misc/motto2.xml?ref=master",
"git": "https://api.github.com/repos/scripting/test1/git/blobs/3b5018fd346ca570b18671437438c544ecd89674",
"html": "https://github.com/scripting/test1/blob/master/blog/misc/motto2.xml"
}
}
]
},
{
"name": "motto.txt",
"path": "blog/motto.txt",
"sha": "ee7c487b6a74456d190dff08cd7722777171d6b2",
"size": 24,
"url": "https://api.github.com/repos/scripting/test1/contents/blog/motto.txt?ref=master",
"html_url": "https://github.com/scripting/test1/blob/master/blog/motto.txt",
"git_url": "https://api.github.com/repos/scripting/test1/git/blobs/ee7c487b6a74456d190dff08cd7722777171d6b2",
"download_url": "https://raw.githubusercontent.com/scripting/test1/master/blog/motto.txt",
"type": "file",
"_links": {
"self": "https://api.github.com/repos/scripting/test1/contents/blog/motto.txt?ref=master",
"git": "https://api.github.com/repos/scripting/test1/git/blobs/ee7c487b6a74456d190dff08cd7722777171d6b2",
"html": "https://github.com/scripting/test1/blob/master/blog/motto.txt"
}
},
{
"name": "pages",
"path": "blog/pages",
"sha": "5f793ec14c3e1975e79db7d9f83c9ef0efef6ef4",
"size": 0,
"url": "https://api.github.com/repos/scripting/test1/contents/blog/pages?ref=master",
"html_url": "https://github.com/scripting/test1/tree/master/blog/pages",
"git_url": "https://api.github.com/repos/scripting/test1/git/trees/5f793ec14c3e1975e79db7d9f83c9ef0efef6ef4",
"download_url": null,
"type": "dir",
"_links": {
"self": "https://api.github.com/repos/scripting/test1/contents/blog/pages?ref=master",
"git": "https://api.github.com/repos/scripting/test1/git/trees/5f793ec14c3e1975e79db7d9f83c9ef0efef6ef4",
"html": "https://github.com/scripting/test1/tree/master/blog/pages"
},
"subs": [
{
"name": "2018",
"path": "blog/pages/2018",
"sha": "be0bf205ce154b7b6be9b2bc8e5eeb8c3d48f2dc",
"size": 0,
"url": "https://api.github.com/repos/scripting/test1/contents/blog/pages/2018?ref=master",
"html_url": "https://github.com/scripting/test1/tree/master/blog/pages/2018",
"git_url": "https://api.github.com/repos/scripting/test1/git/trees/be0bf205ce154b7b6be9b2bc8e5eeb8c3d48f2dc",
"download_url": null,
"type": "dir",
"_links": {
"self": "https://api.github.com/repos/scripting/test1/contents/blog/pages/2018?ref=master",
"git": "https://api.github.com/repos/scripting/test1/git/trees/be0bf205ce154b7b6be9b2bc8e5eeb8c3d48f2dc",
"html": "https://github.com/scripting/test1/tree/master/blog/pages/2018"
},
"subs": [
{
"name": "08",
"path": "blog/pages/2018/08",
"sha": "c7032ed45b1cad905bf1d502886ed7fd6b995cce",
"size": 0,
"url": "https://api.github.com/repos/scripting/test1/contents/blog/pages/2018/08?ref=master",
"html_url": "https://github.com/scripting/test1/tree/master/blog/pages/2018/08",
"git_url": "https://api.github.com/repos/scripting/test1/git/trees/c7032ed45b1cad905bf1d502886ed7fd6b995cce",
"download_url": null,
"type": "dir",
"_links": {
"self": "https://api.github.com/repos/scripting/test1/contents/blog/pages/2018/08?ref=master",
"git": "https://api.github.com/repos/scripting/test1/git/trees/c7032ed45b1cad905bf1d502886ed7fd6b995cce",
"html": "https://github.com/scripting/test1/tree/master/blog/pages/2018/08"
},
"subs": [
{
"name": "21.html",
"path": "blog/pages/2018/08/21.html",
"sha": "2529b5e95ee47f651481645fbfcdb6e31d419a36",
"size": 4642,
"url": "https://api.github.com/repos/scripting/test1/contents/blog/pages/2018/08/21.html?ref=master",
"html_url": "https://github.com/scripting/test1/blob/master/blog/pages/2018/08/21.html",
"git_url": "https://api.github.com/repos/scripting/test1/git/blobs/2529b5e95ee47f651481645fbfcdb6e31d419a36",
"download_url": "https://raw.githubusercontent.com/scripting/test1/master/blog/pages/2018/08/21.html",
"type": "file",
"_links": {
"self": "https://api.github.com/repos/scripting/test1/contents/blog/pages/2018/08/21.html?ref=master",
"git": "https://api.github.com/repos/scripting/test1/git/blobs/2529b5e95ee47f651481645fbfcdb6e31d419a36",
"html": "https://github.com/scripting/test1/blob/master/blog/pages/2018/08/21.html"
}
}
]
}
]
}
]
},
{
"name": "rss.xml",
"path": "blog/rss.xml",
"sha": "50524f299bb0dc1b45c88c2d1afa60653b0a3f35",
"size": 99150,
"url": "https://api.github.com/repos/scripting/test1/contents/blog/rss.xml?ref=master",
"html_url": "https://github.com/scripting/test1/blob/master/blog/rss.xml",
"git_url": "https://api.github.com/repos/scripting/test1/git/blobs/50524f299bb0dc1b45c88c2d1afa60653b0a3f35",
"download_url": "https://raw.githubusercontent.com/scripting/test1/master/blog/rss.xml",
"type": "file",
"_links": {
"self": "https://api.github.com/repos/scripting/test1/contents/blog/rss.xml?ref=master",
"git": "https://api.github.com/repos/scripting/test1/git/blobs/50524f299bb0dc1b45c88c2d1afa60653b0a3f35",
"html": "https://github.com/scripting/test1/blob/master/blog/rss.xml"
}
}
]
},
{
"name": "demodoc.md",
"path": "demodoc.md",
"sha": "10a83ad4187be7a151578a8bac89bc0edc6d8b56",
"size": 221,
"url": "https://api.github.com/repos/scripting/test1/contents/demodoc.md?ref=master",
"html_url": "https://github.com/scripting/test1/blob/master/demodoc.md",
"git_url": "https://api.github.com/repos/scripting/test1/git/blobs/10a83ad4187be7a151578a8bac89bc0edc6d8b56",
"download_url": "https://raw.githubusercontent.com/scripting/test1/master/demodoc.md",
"type": "file",
"_links": {
"self": "https://api.github.com/repos/scripting/test1/contents/demodoc.md?ref=master",
"git": "https://api.github.com/repos/scripting/test1/git/blobs/10a83ad4187be7a151578a8bac89bc0edc6d8b56",
"html": "https://github.com/scripting/test1/blob/master/demodoc.md"
}
},
{
"name": "lyrics.txt",
"path": "lyrics.txt",
"sha": "e60fa2bad0dc3ee5e961fed67f58fd373d08dc9e",
"size": 1273,
"url": "https://api.github.com/repos/scripting/test1/contents/lyrics.txt?ref=master",
"html_url": "https://github.com/scripting/test1/blob/master/lyrics.txt",
"git_url": "https://api.github.com/repos/scripting/test1/git/blobs/e60fa2bad0dc3ee5e961fed67f58fd373d08dc9e",
"download_url": "https://raw.githubusercontent.com/scripting/test1/master/lyrics.txt",
"type": "file",
"_links": {
"self": "https://api.github.com/repos/scripting/test1/contents/lyrics.txt?ref=master",
"git": "https://api.github.com/repos/scripting/test1/git/blobs/e60fa2bad0dc3ee5e961fed67f58fd373d08dc9e",
"html": "https://github.com/scripting/test1/blob/master/lyrics.txt"
}
},
{
"name": "motto.txt",
"path": "motto.txt",
"sha": "b80a59e64bdafaec2bd3f3c836b0dfe281e0c0fc",
"size": 32,
"url": "https://api.github.com/repos/scripting/test1/contents/motto.txt?ref=master",
"html_url": "https://github.com/scripting/test1/blob/master/motto.txt",
"git_url": "https://api.github.com/repos/scripting/test1/git/blobs/b80a59e64bdafaec2bd3f3c836b0dfe281e0c0fc",
"download_url": "https://raw.githubusercontent.com/scripting/test1/master/motto.txt",
"type": "file",
"_links": {
"self": "https://api.github.com/repos/scripting/test1/contents/motto.txt?ref=master",
"git": "https://api.github.com/repos/scripting/test1/git/blobs/b80a59e64bdafaec2bd3f3c836b0dfe281e0c0fc",
"html": "https://github.com/scripting/test1/blob/master/motto.txt"
}
},
{
"name": "podcatch",
"path": "podcatch",
"sha": "2e8a5a3d6735e01b0215c2e2e69eccb18652ebb7",
"size": 0,
"url": "https://api.github.com/repos/scripting/test1/contents/podcatch?ref=master",
"html_url": "https://github.com/scripting/test1/tree/master/podcatch",
"git_url": "https://api.github.com/repos/scripting/test1/git/trees/2e8a5a3d6735e01b0215c2e2e69eccb18652ebb7",
"download_url": null,
"type": "dir",
"_links": {
"self": "https://api.github.com/repos/scripting/test1/contents/podcatch?ref=master",
"git": "https://api.github.com/repos/scripting/test1/git/trees/2e8a5a3d6735e01b0215c2e2e69eccb18652ebb7",
"html": "https://github.com/scripting/test1/tree/master/podcatch"
},
"subs": [
{
"name": "subscriptions.opml",
"path": "podcatch/subscriptions.opml",
"sha": "6e0672e52a6a110b613ec14f98587d37442c6ce2",
"size": 15977,
"url": "https://api.github.com/repos/scripting/test1/contents/podcatch/subscriptions.opml?ref=master",
"html_url": "https://github.com/scripting/test1/blob/master/podcatch/subscriptions.opml",
"git_url": "https://api.github.com/repos/scripting/test1/git/blobs/6e0672e52a6a110b613ec14f98587d37442c6ce2",
"download_url": "https://raw.githubusercontent.com/scripting/test1/master/podcatch/subscriptions.opml",
"type": "file",
"_links": {
"self": "https://api.github.com/repos/scripting/test1/contents/podcatch/subscriptions.opml?ref=master",
"git": "https://api.github.com/repos/scripting/test1/git/blobs/6e0672e52a6a110b613ec14f98587d37442c6ce2",
"html": "https://github.com/scripting/test1/blob/master/podcatch/subscriptions.opml"
}
}
]
},
{
"name": "rss.xml",
"path": "rss.xml",
"sha": "ce013625030ba8dba906f756967f9e9ca394464a",
"size": 6,
"url": "https://api.github.com/repos/scripting/test1/contents/rss.xml?ref=master",
"html_url": "https://github.com/scripting/test1/blob/master/rss.xml",
"git_url": "https://api.github.com/repos/scripting/test1/git/blobs/ce013625030ba8dba906f756967f9e9ca394464a",
"download_url": "https://raw.githubusercontent.com/scripting/test1/master/rss.xml",
"type": "file",
"_links": {
"self": "https://api.github.com/repos/scripting/test1/contents/rss.xml?ref=master",
"git": "https://api.github.com/repos/scripting/test1/git/blobs/ce013625030ba8dba906f756967f9e9ca394464a",
"html": "https://github.com/scripting/test1/blob/master/rss.xml"
}
},
{
"name": "test.md",
"path": "test.md",
"sha": "99e0e750f671055d8ad6980e73bb31f9bb63c7f6",
"size": 5914,
"url": "https://api.github.com/repos/scripting/test1/contents/test.md?ref=master",
"html_url": "https://github.com/scripting/test1/blob/master/test.md",
"git_url": "https://api.github.com/repos/scripting/test1/git/blobs/99e0e750f671055d8ad6980e73bb31f9bb63c7f6",
"download_url": "https://raw.githubusercontent.com/scripting/test1/master/test.md",
"type": "file",
"_links": {
"self": "https://api.github.com/repos/scripting/test1/contents/test.md?ref=master",
"git": "https://api.github.com/repos/scripting/test1/git/blobs/99e0e750f671055d8ad6980e73bb31f9bb63c7f6",
"html": "https://github.com/scripting/test1/blob/master/test.md"
}
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment