https://github.com/spirosikmd/angular-paylogic
An AngularJS service that encapsulates the functionality provided by the Paylogic Ticketing API.
https://github.com/spirosikmd/angular-paylogic
Last synced: about 2 months ago
JSON representation
An AngularJS service that encapsulates the functionality provided by the Paylogic Ticketing API.
- Host: GitHub
- URL: https://github.com/spirosikmd/angular-paylogic
- Owner: spirosikmd
- Created: 2014-08-22T19:17:50.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2014-08-27T17:17:24.000Z (over 10 years ago)
- Last Synced: 2025-01-13T04:27:42.888Z (4 months ago)
- Language: CoffeeScript
- Size: 230 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
angular-paylogic
================An [AngularJS](https://angularjs.org/) service that encapsulates the functionality provided by the
[Paylogic Ticketing API](https://doc.sandbox.paylogic.com/).## Getting Started
``angular-paylogic`` requires [Bower](http://bower.io/) and [CoffeeScript](http://coffeescript.org/).
Run ``bower install`` from the root directory of the project to install all the dependencies.
Then compile the CoffeeScript files into one file with ``coffee --join angular-paylogic.js --compile **/*.coffee``.
Start a web server, e.g. ``python -m SimpleHTTPServer`` from the root directory of the project and check the demo at
[http://localhost:8000/demo.html](http://localhost:8000/demo.html).The example will not work for the public (unfortunately..) as it requires basic authentication to access the API, and
credentials are not provided.## How to use
``angular-paylogic`` exposes a single ``paylogic`` component that can be used in the following way to interact
with resources.```javascript
// Inject the angular-paylogic module.
angular.module('app', ['angular-paylogic'])
// Inject the paylogic service in a controller.
.controller('mainController', function($scope, paylogic) {// Will return all, as no filtering was specified.
$scope.events = paylogic.events.filter();// products.get works, even if it is not defined in Product service, as it is a standard method of $resource.
$scope.product = paylogic.products.get({
productUid: "30df20dd0b0e4bc58f0663edc8a4f640"
});});
```There is a more [detailed example](https://github.com/spirosikmd/angular-paylogic/blob/master/demo.html) that goes through a complete buying process.