1010# Information
1111* ** Supported apiNG models: ` repo ` **
1212* This plugin supports the [ ` get-native-data ` parameter] ( https://aping.readme.io/docs/advanced#parameters )
13+ * This plugin may needs an [ access token] ( #2-access-token ) :warning :
1314* Used promise library: [ angular-github-api-factory] ( https://github.com/JohnnyTheTank/angular-github-api-factory ) _ (included in distribution files)_
1415
1516# Documentation
1920 2 . Include file
2021 3 . Add dependency
2122 4 . Add plugin
22- 2 . [ USAGE] ( #3-usage )
23+ 2 . [ ACCESS TOKEN] ( #2-access-token )
24+ 1 . Generate your ` access_token `
25+ 2 . Insert your ` access_token ` into ` aping-config.js `
26+ 3 . [ USAGE] ( #3-usage )
2327 1 . Models
2428 2 . Requests
2529 3 . Rate limit
@@ -72,14 +76,40 @@ Add the plugin's directive `aping-github="[]"` to your apiNG directive and [conf
7276</aping >
7377```
7478
75- ## 2. USAGE
79+ ## 2. ACCESS TOKEN
80+
81+ ### I. Generate your ` access_token `
82+ 1 . Login on [ github.com] ( https://github.com )
83+ 2 . Open [ github.com/settings/tokens/new] ( https://github.com/settings/tokens/new )
84+ * Remove all scopes except ** public_repo**
85+ * Generate your access_token
86+
87+ ### II. Insert your ` access_token ` into ` aping-config.js `
88+ Create and open ` js/apiNG/aping-config.js ` in your application folder. It should be look like this snippet:
89+ ``` js
90+ angular .module (' jtt_aping' ).config ([' $provide' , function ($provide ) {
91+ $provide .value (" apingDefaultSettings" , {
92+ apingApiKeys : {
93+ github: [
94+ {' access_token' : ' <YOUR_GITHUB_ACCESS_TOKEN>' }
95+ ],
96+ // ...
97+ }
98+ });
99+ }]);
100+ ```
101+
102+ :warning : Replace ` <YOUR_GITHUB_ACCESS_TOKEN> ` with your github ` access_token `
103+
104+ ## 3. USAGE
76105
77106### I. Models
78107Supported apiNG models
79108
80109| model | content | support | max items<br >per request | (native) default items<br >per request |
81110| ----------| ---------| ---------| --------| ---------|
82111| ` repo ` | ** repositories** | full | ` 100 ` | ` 30 ` |
112+ | ` user ` | ** users** | full | ` 100 ` | ` 30 ` |
83113
84114** support:**
85115* full: _ the source platform provides a full list with usable results_ <br >
@@ -100,6 +130,7 @@ Every **apiNG plugin** expects an array of **requests** as html attribute.
100130Sample requests:
101131* ` [{'user':'JohnnyTheTank'}, {'user':'xremix', 'items':10}] `
102132* ` [{'user':'JohnnyTheTank', 'repo':'apiNG'}] `
133+ * ` [{'user':'JohnnyTheTank'}] `
103134
104135#### Requests by Search
105136| parameter | sample | default | description | optional |
@@ -111,6 +142,7 @@ Sample requests:
111142
112143Sample requests:
113144* ` [{'search':'apiNG', 'sort':'stars', 'order':'desc', 'items':50}] `
145+ * ` [{'search':'JohnnyTheTank', 'items':10}] `
114146
115147### III. Rate limit
116148Visit the official [ GitHub Data API documentation] ( https://developer.github.com/v3/#rate-limiting )
0 commit comments