{"id":16858927,"url":"https://github.com/jdmedlock/gitaclue","last_synced_at":"2025-09-02T22:43:34.070Z","repository":{"id":125189565,"uuid":"124557771","full_name":"jdmedlock/GitAClue","owner":"jdmedlock","description":"GitHub Information Extraction Library","archived":false,"fork":false,"pushed_at":"2018-06-12T01:23:44.000Z","size":179,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"development","last_synced_at":"2025-03-08T09:35:25.557Z","etag":null,"topics":["github-api","javascript-packages"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/gitaclue","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/jdmedlock.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-03-09T15:26:24.000Z","updated_at":"2018-05-28T12:44:48.000Z","dependencies_parsed_at":null,"dependency_job_id":"12cda55a-fd18-4866-8c66-5543ac907943","html_url":"https://github.com/jdmedlock/GitAClue","commit_stats":{"total_commits":69,"total_committers":3,"mean_commits":23.0,"dds":0.08695652173913049,"last_synced_commit":"09f4315cc736ed547d36349409b2bf384c42384a"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdmedlock%2FGitAClue","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdmedlock%2FGitAClue/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdmedlock%2FGitAClue/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdmedlock%2FGitAClue/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jdmedlock","download_url":"https://codeload.github.com/jdmedlock/GitAClue/tar.gz/refs/heads/development","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244236080,"owners_count":20420759,"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":["github-api","javascript-packages"],"created_at":"2024-10-13T14:15:37.386Z","updated_at":"2025-03-18T14:08:41.901Z","avatar_url":"https://github.com/jdmedlock.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GitAClue - GitHub Information Extraction Library\n\n[![Build Status](https://travis-ci.org/jdmedlock/GitAClue.svg?branch=development)](https://travis-ci.org/jdmedlock/GitAClue) [![GitHub last commit](https://img.shields.io/github/last-commit/google/skia.svg)](https://github.com/jdmedlock/GitAClue)\n\u003cbr/\u003e\n[![Packagist](https://img.shields.io/packagist/l/doctrine/orm.svg)](https://github.com/jdmedlock/GitAClue/)\n\nGitAClue provides Javascript developers with access to GitHub data\nand metrics for use in their applications. Despite the fact that GitHub's\nAPI makes it easy to access\ninformation, GitAClue makes it even simpler by insulating the caller from the\nGitHub API and by organizing the resulting data in the form of contextually related\nobjects.\n\nGitAClue is opinionated in that it provides access the most frequently required\ndata rather than all of the data available through the GitHub API.\n\n[Installation](#installation) | [Usage](#usage) |\n[Change Log](#change-log) | [Contributing](#contributing) |\n[Authors](#authors) |\n[License](#license)\n\n## Installation\n\nUsing NPM:\n```\n$ npm install gitaclue\n```\n\n## Usage\n\nRequests are made by calling `gitaclue.get(options)`\nwhich returns a JSON document containing the requested information.\n\n### Parameters\n\n'options' describes both the information you require, as well as the order\nit will be returned in resulting JSON document.\n```\n[\n  { context: 'context-id', contextOwner: 'context-owner', contextName: 'context-name',\n    segments: ['segment1', ...] },\n  { context: 'context-id', contextOwner: 'context-owner', contextName: 'context-name',\n    segments: ['segment1', ...] },\n  ...\n]\n```\n\nThe `context` parameter is a string that names the starting point for the\nrequested GitHub information, while `contextOwner` and `contextName` identify\nthe specific context to be retrieved. For example, a context of 'repo', a\ncontextOwner of 'jdmedlock', and a contextName of 'GitAClue'\nestablishes the starting point of the information to be retrieved as being to the\nrepo named 'GitAClue'. Only one context value, context owner, and\ncontext name may be specified in each entry.\n\n`segments` is a list of zero or more sets of information related to a context.\nFor example, producing a list of conributors is relevant only within the\ncontext of a repo.\n\nIt is valid to request a context with no segments. It is also valid to specify\nthe same segment name in more than one context within a single request. The\nfollowing table lists the combinations of context and segments that may be\nrequested together. Over time, GitAClue will be enhanced to provide access to\nadditional contexts and segments.\n\n| Context      | Context Owner | Context Name | Valid Segment Names |\n|:-------------|:--------------|:-------------|:--------------------|\n| organization | N/a           | Required     | repolist            |\n| ratelimit    | N/a           | N/a          | N/a                 |\n| repo         | Required      | Required     | contributors, events |\n| user         | N/a           | Required     | N/a                 |\n\n\n### Return Value\nGitAClue returns a JSON string of the following format:\n```\n{\n  \"01\": {\n    context: {\n      \u003ccontext-1-info\u003e\n      segment: {\u003csegment-1-info\u003e},\n      segment: {\u003csegment-2-info\u003e},\n      ...\n    }\n  },\n  \"02\": {\n    context: {\n      \u003ccontext-2-info\u003e\n      segment: {\u003csegment-1-info\u003e},\n      segment: {\u003csegment-2-info\u003e},\n      ...\n    },\n    ...\n  }\n}\n```\nA numerical key is assigned to each context in the result JSON to provide\nuniqueness for those cases where multiple contexts of the same type are\nrequested in a single call to the `get` function.\n\n### Errors\n\nIn the event that an error is encountered the returned\nJSON string will include an 'error' property with a string value containing\nthe error message. For example,\n```\n{\n  error: 'option parameter is null, undefined, or not an object'\n}\n```\n\nThe GitHub API imposes [rate limits](https://developer.github.com/v3/#rate-limiting)\ndefining the maximum number of API calls that can be made in an hour.\nSince GitAClue uses unauthenticated access to retrieve public data through\nthe API it is subject to rate limits.\n\nWhen the rate limit is exceeded the following error message will be issued.\nFor example,\n```\nGitHub API rate limit exceeded - 0 of 60 remaining. Status:403\n```\n\n### Example\nThe following program requests information about a repo and a user (not necessarily\nrelated to one another) in a single get request,\n```\nconst gitaclue = require('../gitaclue');\n\ngitaclue.get([\n  { context: 'repo', contextOwner: 'ShowMeCoders', contextName: 'showmecoders',\n    segments: ['contributors'] },\n  { context: 'user', contextOwner: '', contextName: 'jdmedlock' },\n])\n.then((response) =\u003e {\n  console.log(`\\nResponse from GitAClue.get(): ${response}`);\n  const ghInfoObject = JSON.parse(response);\n  console.log(`\\nRepo name:${ghInfoObject[0].repo.name}`);\n  console.log('...Contributors:');\n  ghInfoObject[0].repo.contributors.forEach(element =\u003e {\n    console.log(`......${element.name}`);\n  });\n  console.log(`\\nUser name:${ghInfoObject[1].user.name}`);\n})\n.catch((error) =\u003e {\n  console.log(error);\n});\n```\nwhich generates the output:\n```\nResponse from GitAClue.get(): {\n  \"0\": {\n    \"repo\": {\n      \"name\": \"showmecoders\",\n      \"owner\": \"ShowMeCoders\",\n      \"apiUrl\": \"https://api.github.com/repos/ShowMeCoders/showmecoders\",\n      \"id\": 123702029,\n      \"description\": \"A portfolio of Missouri participants in the Grow With Google Challenge Scholarship program at Udacity\",\n      \"html_url\": \"https://github.com/ShowMeCoders/showmecoders\",\n      \"private\": false,\n      \"forked\": false,\n      \"cloned\": true,\n      \"created_at\": \"2018-03-03T15:01:18Z\",\n      \"updated_at\": \"2018-04-14T14:54:32Z\",\n      \"pushed_at\": \"2018-04-14T14:59:46Z\",\n      \"noStars\": 5,\n      \"noWatchers\": 5,\n      \"language\": \"HTML\",\n      \"license\": {\n        \"key\": \"mit\",\n        \"name\": \"MIT License\",\n        \"spdx_id\": \"MIT\",\n        \"url\": \"https://api.github.com/licenses/mit\"\n      },\n      \"noForks\": 0,\n      \"contributors\": [\n        {\n          \"name\": \"jdmedlock\",\n          \"apiUrl\": \"https://api.github.com/users/jdmedlock\",\n          \"id\": 1287072,\n          \"avatar_url\": \"https://avatars3.githubusercontent.com/u/1287072?v=4\",\n          \"html_url\": \"https://github.com/jdmedlock\",\n          \"type\": \"User\",\n          \"location\": \"St. Louis, MO\",\n          \"email\": null,\n          \"bio\": \"Experienced IT professional with a background in both software development and infrastructure. Main areas of focus are Scrum and Javascript/NodeJS development.\",\n          \"followers\": 49,\n          \"following\": 6,\n          \"created_at\": \"2011-12-27T00:14:59Z\",\n          \"updated_at\": \"2018-04-13T20:57:08Z\"\n        },\n        {\n          \"name\": \"ZumDeWald\",\n          \"apiUrl\": \"https://api.github.com/users/ZumDeWald\",\n          \"id\": 35619162,\n          \"avatar_url\": \"https://avatars0.githubusercontent.com/u/35619162?v=4\",\n          \"html_url\": \"https://github.com/ZumDeWald\",\n          \"type\": \"User\",\n          \"location\": \"St. Louis, MO\",\n          \"email\": null,\n          \"bio\": \"I'm NEW, but working on it...\",\n          \"followers\": 5,\n          \"following\": 9,\n          \"created_at\": \"2018-01-20T03:52:14Z\",\n          \"updated_at\": \"2018-03-26T19:46:31Z\"\n        },\n        {\n          \"name\": \"nickhaynes\",\n          \"apiUrl\": \"https://api.github.com/users/nickhaynes\",\n          \"id\": 36779922,\n          \"avatar_url\": \"https://avatars0.githubusercontent.com/u/36779922?v=4\",\n          \"html_url\": \"https://github.com/nickhaynes\",\n          \"type\": \"User\",\n          \"location\": null,\n          \"email\": null,\n          \"bio\": \"Former politico and aspiring developer.\",\n          \"followers\": 3,\n          \"following\": 3,\n          \"created_at\": \"2018-02-24T01:13:02Z\",\n          \"updated_at\": \"2018-04-11T17:02:36Z\"\n        },\n        {\n          \"name\": \"kylegeary\",\n          \"apiUrl\": \"https://api.github.com/users/kylegeary\",\n          \"id\": 19237299,\n          \"avatar_url\": \"https://avatars3.githubusercontent.com/u/19237299?v=4\",\n          \"html_url\": \"https://github.com/kylegeary\",\n          \"type\": \"User\",\n          \"location\": \"USA\",\n          \"email\": null,\n          \"bio\": \"Web application manager and front-end developer\",\n          \"followers\": 1,\n          \"following\": 0,\n          \"created_at\": \"2016-05-07T10:05:49Z\",\n          \"updated_at\": \"2018-04-14T00:41:01Z\"\n        },\n        {\n          \"name\": \"MawsayB\",\n          \"apiUrl\": \"https://api.github.com/users/MawsayB\",\n          \"id\": 28719588,\n          \"avatar_url\": \"https://avatars0.githubusercontent.com/u/28719588?v=4\",\n          \"html_url\": \"https://github.com/MawsayB\",\n          \"type\": \"User\",\n          \"location\": \"St. Charles, Missouri\",\n          \"email\": null,\n          \"bio\": \"Software Developer\",\n          \"followers\": 7,\n          \"following\": 0,\n          \"created_at\": \"2017-05-16T01:12:15Z\",\n          \"updated_at\": \"2018-01-31T00:52:55Z\"\n        },\n        {\n          \"name\": \"blevine08\",\n          \"apiUrl\": \"https://api.github.com/users/blevine08\",\n          \"id\": 35310871,\n          \"avatar_url\": \"https://avatars1.githubusercontent.com/u/35310871?v=4\",\n          \"html_url\": \"https://github.com/blevine08\",\n          \"type\": \"User\",\n          \"location\": \"Columbia, Missouri, USA\",\n          \"email\": null,\n          \"bio\": \"A naturally creative individual working in IT. Current Windows Server Admin for IBM and Front End Developer in training.\",\n          \"followers\": 4,\n          \"following\": 0,\n          \"created_at\": \"2018-01-10T20:10:50Z\",\n          \"updated_at\": \"2018-04-11T18:37:38Z\"\n        },\n        {\n          \"name\": \"xvasser\",\n          \"apiUrl\": \"https://api.github.com/users/xvasser\",\n          \"id\": 32984629,\n          \"avatar_url\": \"https://avatars1.githubusercontent.com/u/32984629?v=4\",\n          \"html_url\": \"https://github.com/xvasser\",\n          \"type\": \"User\",\n          \"location\": null,\n          \"email\": null,\n          \"bio\": null,\n          \"followers\": 2,\n          \"following\": 7,\n          \"created_at\": \"2017-10-21T15:38:58Z\",\n          \"updated_at\": \"2018-04-12T17:57:22Z\"\n        }\n      ]\n    }\n  },\n  \"1\": {\n    \"user\": {\n      \"name\": \"jdmedlock\",\n      \"apiUrl\": \"https://api.github.com/users/jdmedlock\",\n      \"id\": 1287072,\n      \"avatar_url\": \"https://avatars3.githubusercontent.com/u/1287072?v=4\",\n      \"html_url\": \"https://github.com/jdmedlock\",\n      \"type\": \"User\",\n      \"location\": \"St. Louis, MO\",\n      \"email\": null,\n      \"bio\": \"Experienced IT professional with a background in both software development and infrastructure. Main areas of focus are Scrum and Javascript/NodeJS development.\",\n      \"followers\": 49,\n      \"following\": 6,\n      \"created_at\": \"2011-12-27T00:14:59Z\",\n      \"updated_at\": \"2018-04-13T20:57:08Z\"\n    }\n  }\n}\n\nRepo name:showmecoders\n...Contributors:\n......jdmedlock\n......ZumDeWald\n......nickhaynes\n......kylegeary\n......MawsayB\n......blevine08\n......xvasser\n\nUser name:jdmedlock\n```\n## Change Log\n\nFor more information see [Change Log](https://github.com/jdmedlock/GitAClue/blob/development/CHANGELOG.md)\n\n## Contributing\n\nSee [Contributing](https://github.com/jdmedlock/GitAClue/blob/development/CONTRIBUTING.md)\nand our [Collaborator Guide](https://github.com/jdmedlock/GitAClue/blob/development/COLLABORATOR_GUIDE.md).\n\n## Authors\n\nDevelopers on this project can be found on the [Contributors](https://github.com/jdmedlock/GitAClue/graphs/contributors) page of this repo.\n\n## License\n\n[MIT](https://tldrlegal.com/license/mit-license)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjdmedlock%2Fgitaclue","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjdmedlock%2Fgitaclue","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjdmedlock%2Fgitaclue/lists"}