Add predictive pricing

Change-Id: Ia6d461539e3732597f7930a86f1a163243617fc0
This commit is contained in:
Guillaume Espanel
2015-04-20 15:54:02 +00:00
committed by Gauvain Pocentek
parent b299a805a9
commit a2bd4f8127
2 changed files with 10 additions and 0 deletions

View File

@@ -55,6 +55,7 @@ class Client(object):
self.http_client = client.BaseClient(self.client)
self.modules = core.CloudkittyModuleManager(self.http_client)
self.reports = report.ReportManager(self.http_client)
self.quotations = core.QuotationManager(self.http_client)
self._expose_submodules()
def _expose_submodules(self):

View File

@@ -51,3 +51,12 @@ class CollectorManager(base.Manager):
base_url = "/v1/rating"
key = "collector"
collection_key = "collectors"
class QuotationManager(base.Manager):
base_url = "/v1/rating/quote"
def quote(self, resources):
out = self.api.post(self.base_url,
json={'resources': resources}).json()
return out