https://github.com/acidstudios/angular-trello
Angular Wrapper for Trello API
https://github.com/acidstudios/angular-trello
Last synced: 4 months ago
JSON representation
Angular Wrapper for Trello API
- Host: GitHub
- URL: https://github.com/acidstudios/angular-trello
- Owner: acidstudios
- License: mit
- Created: 2015-01-26T10:46:03.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2016-04-23T17:42:45.000Z (about 10 years ago)
- Last Synced: 2026-01-23T19:55:42.440Z (5 months ago)
- Language: HTML
- Size: 28.3 KB
- Stars: 11
- Watchers: 2
- Forks: 9
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
angular-trello
==================
[](https://travis-ci.org/acidstudios/angular-trello)
[](https://david-dm.org/acidstudios/angular-trello)
[](https://david-dm.org/acidstudios/angular-trello#info=devDependencies&view=table)
> Angular.JS module to handle the Trello Api.
#### Install
```
$ bower install angular-trello
```
#### Usage
```
var app = angular.module('providertest', ['trello']);
// Configure the Provider
app.config(['TrelloApiProvider', function(TrelloApiProvider) {
TrelloApiProvider.init({
key: 'YOUR_KEY',
secret: 'YOUR_SECRET',
scope: {read: true, write: true, account: true},
name: 'Angular-Trello Test'
});
}]);
// Use into the Controllers
app.controller('TestCtrl', ['$scope', 'TrelloApi', function($scope, TrelloApi){
$scope.boards = [];
$scope.test = function () {
TrelloApi.Authenticate().then(function(){
alert(TrelloApi.Token());
}, function(){
alert('no');
});
};
$scope.getMe = function () {
TrelloApi.Rest('GET', 'members/me').then(function(res){
$scope.boards = res.idBoards;
alert(res);
}, function(err){
alert(err);
});
};
$scope.getBoards = function() {
TrelloApi.boards($scope.boards[0], {}).then(function(res) {
alert(res);
}, function(err) {
alert(err);
});
};
}]);
```
#### Credits
Gustavo Barrientos Guerrero