Merge "Add predictive pricing"

This commit is contained in:
Jenkins
2015-05-05 09:39:04 +00:00
committed by Gerrit Code Review
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