{"id":18553692,"url":"https://github.com/websemantics/gitters","last_synced_at":"2025-11-01T10:30:23.041Z","repository":{"id":58234460,"uuid":"65059745","full_name":"websemantics/gitters","owner":"websemantics","description":"Straightforward Github reader with cache.","archived":false,"fork":false,"pushed_at":"2016-10-24T18:01:06.000Z","size":12,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-26T09:10:00.081Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/websemantics.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-08-06T01:48:56.000Z","updated_at":"2021-01-13T19:50:39.000Z","dependencies_parsed_at":"2022-08-31T00:31:22.063Z","dependency_job_id":null,"html_url":"https://github.com/websemantics/gitters","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/websemantics%2Fgitters","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/websemantics%2Fgitters/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/websemantics%2Fgitters/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/websemantics%2Fgitters/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/websemantics","download_url":"https://codeload.github.com/websemantics/gitters/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239278543,"owners_count":19612329,"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-06T21:17:58.038Z","updated_at":"2025-11-01T10:30:22.960Z","avatar_url":"https://github.com/websemantics.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"```        \n                ░░░░░░░░░\n             ░░░░░░░░░░░░░░░\n          ░░░░░/   \\░░░░░░░░░░░\n        ░░░░░░░\\   /░░/   \\░░░░░░            \n          ░░░░░░| |░░░\\  _/░░░░░                \n            ░░░░| |░░░/ /░░░░    \n              ░░| |░░/ /░░░\n             ___| |░/ /░░____________________  _____\n            / ____// //_  __/_  __/ ____/ __ \\/ ___/\n           / / __ / /  / /   / / / __/ / /_/ /\\__ \\\n          / /_/ // /  / /   / / / /___/ _, _/___/ /\n          \\____/___/ /_/   /_/ /_____/_/ |_\\/____/  \n\n          Straightforward Github reader with cache\n```\n\u003e Gitters is a utility that provides a straightforward way to access content on Github without the hassle of dealing with Github API libraries. There is no need for an `API KEY` to use Gitters, and, the library provides a basic cache support using [Larder](https://github.com/websemantics/larder) to optimize network usage.\n\n## Install\n\nBower\n\n```bash\nBower install gitters\n```\n\nNPM\n\n```bash\nnpm i install gitters\n```\n\n## Getting Started\n\nThis library comes pre-configured with three global settings, `clearOnStart` to indicate clearing the cache on each Browser refresh event (enabled by default), `expires`, the expiration period per stored item in minutes (set to 1 hour by default), to change,\n\n```javascript\nGitters.defaults({\n  clearOnStart: false,\n  expires: '120' /* two hours expiration per item */\n})\n```\n\nAnd finally, `decodeBase64` which when set to `true`, the content of all retrieved objects will be Base64-decoded before saving the the cache. This setting `decodeBase64` is enabled by default; here's how to switch it off,\n\n```javascript\nGitters.defaults({\n  decodeBase64: false\n})\n```\n\n## Usage\n\nThe library provides one pubic method besides setting defaults, `fetch` to enable content navigation Github,\n\n- Get repo details,\n\n```javascript\nGitters.fetch('websemantics/semantic-ant', function(repo){\n  console.log(repo)\n})\n```\n\n- Returns the content of a folder (list of files)\n\n```javascript\nGitters.content('websemantics/vimeo-upload', 'img', 'master', function(files) {\n  console.log(files)\n})\n```\n\nThe branch argument is optional.\n\n- Get the content of a list of files\n\n```javascript\nGitters.fetch('websemantics/Hotdraw.js', 'src/Demo', function(files) {\n    Gitters.fetch('websemantics/Hotdraw.js', files.map(function(file) {\n        return file.path\n    }), 'master', function(jsFiles) {\n        for (i in jsFiles) {\n            console.log(jsFiles[i].content)\n        }\n    })\n})\n```\n\n## Used By\n\nThe [Semantic Ant](https://github.com/websemantics/semantic-ant) project uses [Gitters](https://github.com/websemantics/gitters) to read documentation files directly from the Browser.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebsemantics%2Fgitters","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwebsemantics%2Fgitters","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebsemantics%2Fgitters/lists"}