blob: a5b7e5cc1ccfd9c623302ee24c839a0cad616d46 [file] [log] [blame]
Matteo Scandolo035c5932016-12-14 09:55:15 -08001import {AppConfig} from '../../config/app.config';
2
3export interface IXosResourceService {
4 getResource(): ng.resource.IResourceClass<any>;
5}
6
7export class SlicesRest implements IXosResourceService {
8 static $inject = ['$resource'];
9 private resource: angular.resource.IResourceClass<any>;
10
11 /** @ngInject */
12 constructor(
13 private $resource: ng.resource.IResourceService
14 ) {
15 this.resource = this.$resource(`${AppConfig.apiEndpoint}/core/slices/`);
16 }
17
18 public getResource(): ng.resource.IResourceClass<ng.resource.IResource<any>> {
19 return this.resource;
20 }
21}