Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jpommerening/ax-github
Activities to query data and events (commits, tags, issues) from GitHub
https://github.com/jpommerening/ax-github
Last synced: 24 days ago
JSON representation
Activities to query data and events (commits, tags, issues) from GitHub
- Host: GitHub
- URL: https://github.com/jpommerening/ax-github
- Owner: jpommerening
- Created: 2015-08-19T12:41:11.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2015-12-16T16:11:55.000Z (almost 9 years ago)
- Last Synced: 2024-04-14T15:48:53.068Z (7 months ago)
- Language: JavaScript
- Size: 72.3 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ax-github
> :octocat: Activites to provide GitHub data and events as resources
*Note:* This repo contains ECMAScript2015 code! To use these activities
with RequireJS, install `requirejs-babel` 0.0.8 and add the following
to your `require_config.js` file:```js
paths: {
es6: 'requirejs-babel/es6',
babel: 'requirejs-babel/babel-5.8.22.min'
},
config: {
es6: {
sourceMap: 'inline',
resolveModuleSource: function( source ) {
return ( source[0] === '.' ) ? 'es6!' + source : source;
}
}
}
```Additionally the activities heavily use `window.fetch` and `window.Promise`
so if your browser does not support these, you'll have to use a shim.## Example
You can wire up multiple of the supplied activities in your page. Their
configuration is intended to be easily composable.
The following example …- fetches info about the authenticated user and the user's repositories
- fetches issue data for the repositories
- polls for events happening in the repositories```json
"activies": [{
"widget": "amd:laxar-github/userdata-activity",
"features": {
"auth": {
"resource": "accessToken",
"flag": "authenticated"
},
"user": {
"resource": "user"
},
"repos": {
"resource": "repos",
"sort": "updated",
"direction": "desc"
}
}
},
{
"widget": "amd:laxar-github/data-activity",
"features": {
"auth": {
"resource": "accessToken",
"flag": "authenticated"
},
"data": {
"resource": "issues",
"sources": {
"resource": "resource",
"follow": "issues_url"
}
}
}
},
{
"widget": "amd:laxar-github/events-activity",
"features": {
"auth": {
"resource": "accessToken",
"flag": "authenticated"
},
"events": {
"resource": "events",
"sources": {
"resource": "repos",
"follow": "events_url"
}
}
}
}]
```