- Notifications
You must be signed in to change notification settings - Fork4
AngularJS Factory for GitHub v3 JSON REST API requests
License
NotificationsYou must be signed in to change notification settings
JohnnyTheTank/angular-github-api-factory
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
angular-github-api-factory is an angularjs module with a github api factory.
Author: Jonathan Hornung (JohnnyTheTank)
Install via eitherbower,npm or downloaded files:
bower install --save angular-github-api-factory
npm install --save angular-github-api-factory
- downloadangular-github-api-factory.zip
Include dependencies in your HTML.
- When using bower:
<scriptsrc="bower_components/angular-github-api-factory/dist/angular-github-api-factory.min.js"></script>
- When using npm:
<scriptsrc="node_modules/angular-github-api-factory/dist/angular-github-api-factory.min.js"></script>
- when using downloaded files
<scriptsrc="angular-github-api-factory.min.js"></script>
Add
jtt_github
to your application's module dependencies.Use the factory
githubFactory
githubFactory.getUser({user:"<USERNAME_NAME>",access_token:"<ACCESS_TOKEN>"// (optional)}).then(function(_data){//on success}).catch(function(_data){//on error});
// https://developer.github.com/v3/search/#search-usersgithubFactory.getUsers({q:"<SEARCH_STRING>",// (optional)sort:"<SORT_STRING>",// (optional) 'followers', 'repositories', 'joined'order:"<SORT_ORDER>",// (optional) 'desc', 'asc'per_page:"<ITEMS_PER_PAGE>",// (optional) valid values: 1-100 | default: 30}).then(function(_data){//on success}).catch(function(_data){//on error});
githubFactory.getRepoByUserAndName({user:"<USER_NAME>",repo:"<REPO_NAME>",access_token:"<ACCESS_TOKEN>"// (optional)}).then(function(_data){//on success}).catch(function(_data){//on error});
// https://developer.github.com/v3/search/#search-repositoriesgithubFactory.getReposByName({q:"<SEARCH_STRING>",sort:"<SORT_STRING>",// (optional) 'stars', 'forks', or 'updated'order:"<SORT_ORDER>",// (optional) 'desc', 'asc'per_page:"<ITEMS_PER_PAGE>",// (optional) valid values: 1-100 | default: 30access_token:"<ACCESS_TOKEN>"// (optional)}).then(function(_data){//on success}).catch(function(_data){//on error});
githubFactory.getReposByUser({user:"<USER_NAME>",q:"<SEARCH_STRING>",// (optional)sort:"<SORT_STRING>",// (optional) 'stars', 'forks', or 'updated'order:"<SORT_ORDER>",// (optional) 'desc', 'asc'per_page:"<ITEMS_PER_PAGE>",// (optional) valid values: 1-100 | default: 30access_token:"<ACCESS_TOKEN>"// (optional)}).then(function(_data){//on success}).catch(function(_data){//on error});
githubFactory.getEventsFromRepoByUserAndName({user:"<USER_NAME>",repo:"<REPO_NAME>",q:"<SEARCH_STRING>",// (optional)sort:"<SORT_STRING>",// (optional)order:"<SORT_ORDER>",// (optional) 'desc', 'asc'per_page:"<ITEMS_PER_PAGE>",// (optional) valid values: 1-100 | default: 30access_token:"<ACCESS_TOKEN>"// (optional)}).then(function(_data){//on success}).catch(function(_data){//on error});
githubFactory.getEventsByUser({user:"<USER_NAME>",q:"<SEARCH_STRING>",// (optional)sort:"<SORT_STRING>",// (optional)order:"<SORT_ORDER>",// (optional) 'desc', 'asc'per_page:"<ITEMS_PER_PAGE>",// (optional) valid values: 1-100 | default: 30access_token:"<ACCESS_TOKEN>"// (optional)}).then(function(_data){//on success}).catch(function(_data){//on error});
bandsintown -dailymotion -facebook -footballdata -flickr -github -openweathermap -tumblr -vimeo -wikipedia -youtube
MIT
About
AngularJS Factory for GitHub v3 JSON REST API requests
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
No packages published
Uh oh!
There was an error while loading.Please reload this page.