Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

angular-github-api-factory is an angularjs module with a github api factory.

npm versionBower version

Author: Jonathan Hornung (JohnnyTheTank)

Usage

  1. Install via eitherbower,npm or downloaded files:

    1. bower install --save angular-github-api-factory
    2. npm install --save angular-github-api-factory
    3. downloadangular-github-api-factory.zip
  2. Include dependencies in your HTML.

    1. When using bower:
    <scriptsrc="bower_components/angular-github-api-factory/dist/angular-github-api-factory.min.js"></script>
    1. When using npm:
    <scriptsrc="node_modules/angular-github-api-factory/dist/angular-github-api-factory.min.js"></script>
    1. when using downloaded files
    <scriptsrc="angular-github-api-factory.min.js"></script>
  3. Addjtt_github to your application's module dependencies.

  4. Use the factorygithubFactory

factory methods

getUser

githubFactory.getUser({user:"<USERNAME_NAME>",access_token:"<ACCESS_TOKEN>"// (optional)}).then(function(_data){//on success}).catch(function(_data){//on error});

getUsers

// 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});

getRepo

githubFactory.getRepoByUserAndName({user:"<USER_NAME>",repo:"<REPO_NAME>",access_token:"<ACCESS_TOKEN>"// (optional)}).then(function(_data){//on success}).catch(function(_data){//on error});

getRepos

// 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});

getEvents

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});

Github JSON API

More angular-api-factories

bandsintown -dailymotion -facebook -footballdata -flickr -github -openweathermap -tumblr -vimeo -wikipedia -youtube

License

MIT

About

AngularJS Factory for GitHub v3 JSON REST API requests

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp