Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/0x-r4bbit/angular-github-adapter
Angular adapter module for github.js
https://github.com/0x-r4bbit/angular-github-adapter
Last synced: about 1 month ago
JSON representation
Angular adapter module for github.js
- Host: GitHub
- URL: https://github.com/0x-r4bbit/angular-github-adapter
- Owner: 0x-r4bbit
- License: wtfpl
- Created: 2013-06-01T21:56:25.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2023-04-16T07:10:02.000Z (over 1 year ago)
- Last Synced: 2024-09-04T00:03:29.153Z (3 months ago)
- Language: JavaScript
- Size: 349 KB
- Stars: 48
- Watchers: 2
- Forks: 28
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# angular-github-adapter
> Angular adapter module for github.js
Full API: [Github.js](https://github.com/michael/github)
## Quick Start
Install adapter via bower:
````
$ bower install angular-github-adapter
````Declare it as dependency in your app:
```js
angular.module('myApp', ['pascalprecht.github-adapter']);
```Use the `$githubProvider` to configure the service:
```js
angular.module('myApp').config(function ($githubProvider) {
$githubProvider.username('YOUR_USERNAME');
$githubProvider.password('YOUR_PASSWORD');
$githubProvider.authType('basic');
});
```It is also possible to set credentials through the service itself
```js
$github.setCreds('YOUR_USERNAME', 'YOUR_PASSWORD', 'basic');
```Now you can access `$github` service within your controller and services. It provides the same API as [Github.js](https://github.com/michael/github), just with promises :)