{"id":21016653,"url":"https://github.com/gsa/very-simple-api","last_synced_at":"2025-12-25T18:46:30.487Z","repository":{"id":13698162,"uuid":"16392020","full_name":"GSA/Very-Simple-API","owner":"GSA","description":"A barebones API","archived":false,"fork":false,"pushed_at":"2015-04-08T19:12:24.000Z","size":286,"stargazers_count":15,"open_issues_count":3,"forks_count":11,"subscribers_count":8,"default_branch":"gh-pages","last_synced_at":"2025-01-20T12:11:03.642Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://gsa.github.io/Very-Simple-API","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GSA.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-01-30T21:48:33.000Z","updated_at":"2024-12-26T07:27:21.000Z","dependencies_parsed_at":"2022-09-06T00:10:31.142Z","dependency_job_id":null,"html_url":"https://github.com/GSA/Very-Simple-API","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GSA%2FVery-Simple-API","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GSA%2FVery-Simple-API/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GSA%2FVery-Simple-API/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GSA%2FVery-Simple-API/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GSA","download_url":"https://codeload.github.com/GSA/Very-Simple-API/tar.gz/refs/heads/gh-pages","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243447516,"owners_count":20292448,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-19T10:15:23.362Z","updated_at":"2025-12-25T18:46:30.449Z","avatar_url":"https://github.com/GSA.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"Simple-API\n==========\n\nThis project follows [@benbalter's work](http://github.com/benbalter/simple-api).  Maintaining this simple data file automatically generates [JSON](http://gsa.github.io/Very-Simple-API/objects.json), [XML](http://gsa.github.io/Very-Simple-API/objects.xml), [HTML](http://gsa.github.io/Very-Simple-API/), and [CSV](http://gsa.github.io/Very-Simple-API/objects.csv).  \n\nNote that there is now also a [2nd version](https://github.com/GSA/Very-Simple-API-2) based off of a CSV data file.   \n\n## Steps\n\n1) Create a new repo.  [+](https://github.com/GSA/Very-Simple-API/blob/gh-pages/extended_instructions.md#1-create-a-new-repo)   \n2) Create a new branch called gh-pages.  In the repository's settings, set gh-pages as the default branch. [+](https://github.com/GSA/Very-Simple-API/blob/gh-pages/extended_instructions.md#2-create-a-new-branch-called-gh-pages)  \n3) Create a YML file in a /_data folder, name it `objects.yml`, insert the below, and save.  [+](https://github.com/GSA/Very-Simple-API/blob/gh-pages/extended_instructions.md#3-create-a-yml-file-in-a-_data-folder-name-it-objectsyml-insert-the-below-and-save)     \n\n````\nrover:\n  age: 2\n  breed: lab\n  color: black\nspot:\n  age: 3\n  breed: dalmation\n  color: white\nlassie:\n  age: 70\n  breed: collie\n  color: brown\n````\n\n4) Create a json template file, name it `objects.json`, and include the below: [+](https://github.com/GSA/Very-Simple-API/blob/gh-pages/extended_instructions.md#4-create-a-json-template-file-name-it-objectsjson-and-modify-the-term-after-sitedata-to-include-the-name-of-the-yml-file)  \n\n````\n---\n---\n{{ site.data.objects | jsonify }}\n````\n\nThe end result will now be avialable at http://**username**.github.io/**name-of-repo**/objects.json.  For instance,  http://gsa.github.io/Very-Simple-API/objects.json.\n\n5) Create an xml template file, name it `objects.xml`, and include the below:  [+](https://github.com/GSA/Very-Simple-API/blob/gh-pages/extended_instructions.md#5-create-an-xml-template-file-name-it-objectsxml-and-include-the-below)  \n\n````\n---\n---\n\u003cdogs\u003e\n  {% for dog in site.data.objects %}\n  \u003cdog\u003e\n    \u003cname\u003e{{ dog[0] }}\u003c/name\u003e\n    \u003cbreed\u003e{{ dog[1].color }}\u003c/breed\u003e\n    \u003cage\u003e{{ dog[1].age }}\u003c/age\u003e\n    \u003ccolor\u003e{{ dog[1].color}}\u003c/color\u003e\n  \u003c/dog\u003e\n  {% endfor %}\n\u003c/dogs\u003e\n````\n\n The end result will now be avialable at http://**username**.github.io/**name-of-repo**/objects.xml.  For instance,  http://gsa.github.io/Very-Simple-API/objects.xml.\n\n6)  Create a csv template, name it `objects.csv`, and include the below:  [+](https://github.com/GSA/Very-Simple-API/blob/gh-pages/extended_instructions.md#6-create-a-csv-template-name-it-objectscsv-and-include-the-below)  \n\n````\n---\n---\nName,Age,Breed,Color\n{% for dog in site.data.objects %}{{ dog[0] }},{{ dog[1].age }},{{ dog[1].breed }},{{ dog[1].color }}\n{% endfor %}\n````\n\n The end result will now be avialable at http://**username**.github.io/**name-of-repo**/objects.csv.  For instance, http://gsa.github.io/Very-Simple-API/objects.csv.\n\n7) Create an html template, name it `index.html`, and include the below:  [+](https://github.com/GSA/Very-Simple-API/blob/gh-pages/extended_instructions.md#7-create-an-html-template-name-it-indexhtml-and-include-the-below)  \n````\n    \u003chtml\u003e\n      \u003cbody\u003e\n        \u003cscript src=\"http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js\"\u003e\u003c/script\u003e\n        \u003cscript\u003e\n        $.getJSON( \"objects.json\", function(objects) {\n          $.each(objects, function(name, attributes) {\n            document.write(\"\u003ch2\u003e\" + name + \"\u003c/h2\u003e\");\n            document.write(\"Age: \" + attributes[\"age\"] + \"\u003cbr /\u003e\");\n            document.write(\"Breed: \" + attributes[\"breed\"] + \"\u003cbr /\u003e\");\n            document.write(\"Color: \" + attributes[\"color\"] + \"\u003cbr /\u003e\");\n          });\n        })\n        \u003c/script\u003e\n      \u003c/body\u003e\n    \u003c/html\u003e\n````\n\n The end result will now be avialable at http://**username**.github.io/**name-of-repo**/.  For instance, http://gsa.github.io/Very-Simple-API/.\n\n\n## Resources \n\n* [CSV-to-YML converter](http://www.smilingshark.net/webtools/csv2yml.php)\n* [YAML Validator](http://yamllint.com/)\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgsa%2Fvery-simple-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgsa%2Fvery-simple-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgsa%2Fvery-simple-api/lists"}