Skip to content
This repository has been archived by the owner on Apr 3, 2023. It is now read-only.

Commit

Permalink
feat(cloud.project): add io api bindings (#240)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jisay authored and antleblanc committed Oct 2, 2019
1 parent 9f685c1 commit c79872d
Show file tree
Hide file tree
Showing 12 changed files with 102 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/api/cloud/project/cloud-project.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ angular.module('ovh-api-services').service('OvhApiCloudProject', ($injector, $ca
Instance() {
return $injector.get('OvhApiCloudProjectInstance');
},
Io() {
return $injector.get('OvhApiCloudProjectIo');
},
Ip() {
return $injector.get('OvhApiCloudProjectIp');
},
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
angular
.module('ovh-api-services')
.service('OvhApiCloudProjectIoCapabilities', $injector => ({
Stream: () => $injector.get('OvhApiCloudProjectIoCapabilitiesStream'),
}));
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
angular
.module('ovh-api-services')
.service('OvhApiCloudProjectIoCapabilitiesStream', $injector => ({
Region: () => $injector.get('OvhApiCloudProjectIoCapabilitiesStreamRegion'),
}));
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
angular
.module('ovh-api-services')
.service('OvhApiCloudProjectIoCapabilitiesStreamRegion', $injector => ({
v6: () => $injector.get('OvhApiCloudProjectIoCapabilitiesStreamRegionV6'),
}));
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
angular
.module('ovh-api-services')
.service('OvhApiCloudProjectIoCapabilitiesStreamRegionV6', ($resource) => {
const resource = $resource('/cloud/project/:serviceName/io/capabilities/stream/region/:regionName', {
serviceName: '@serviceName',
regionName: '@regionName',
});

return resource;
});
6 changes: 6 additions & 0 deletions src/api/cloud/project/io/cloud-project-io.service.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
angular
.module('ovh-api-services')
.service('OvhApiCloudProjectIo', $injector => ({
Capabilities: () => $injector.get('OvhApiCloudProjectIoCapabilities'),
Stream: () => $injector.get('OvhApiCloudProjectIoStream'),
}));
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
angular
.module('ovh-api-services')
.service('OvhApiCloudProjectIoStream', $injector => ({
v6: () => $injector.get('OvhApiCloudProjectIoStreamV6'),
Subscription: () => $injector.get('OvhApiCloudProjectIoStreamSubscription'),
Token: () => $injector.get('OvhApiCloudProjectIoStreamToken'),
}));
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
angular
.module('ovh-api-services')
.service('OvhApiCloudProjectIoStreamV6', ($resource) => {
const resource = $resource('/cloud/project/:serviceName/io/stream/:streamId', {
serviceName: '@serviceName',
streamId: '@streamId',
}, {
edit: {
method: 'PUT',
},
getStats: {
url: '/cloud/project/:serviceName/io/stream/:streamId/stats',
method: 'GET',
isArray: false,
},
});

return resource;
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
angular
.module('ovh-api-services')
.service('OvhApiCloudProjectIoStreamSubscription', $injector => ({
v6: () => $injector.get('OvhApiCloudProjectIoStreamSubscriptionV6'),
}));
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
angular
.module('ovh-api-services')
.service('OvhApiCloudProjectIoStreamSubscriptionV6', ($resource) => {
const resource = $resource('/cloud/project/:serviceName/io/stream/:streamId/subscription/:subscriptionId', {
serviceName: '@serviceName',
streamId: '@streamId',
subscriptionId: '@subscriptionId',
}, {
resetCursor: {
method: 'POST',
url: '/cloud/project/:serviceName/io/stream/:streamId/subscription/:subscriptionId/resetCursor',
},
getStats: {
url: '/cloud/project/:serviceName/io/stream/:streamId/subscription/:subscriptionId/stats',
method: 'GET',
isArray: false,
},
});

return resource;
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
angular
.module('ovh-api-services')
.service('OvhApiCloudProjectIoStreamToken', $injector => ({
v6: () => $injector.get('OvhApiCloudProjectIoStreamTokenV6'),
}));
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
angular
.module('ovh-api-services')
.service('OvhApiCloudProjectIoStreamTokenV6', ($resource) => {
const resource = $resource('/cloud/project/:serviceName/io/stream/:streamId/token/:tokenId', {
serviceName: '@serviceName',
streamId: '@streamId',
tokenId: '@tokenId',
});

return resource;
});

0 comments on commit c79872d

Please sign in to comment.