Exemplo n.º 1
0
 def upcoming(self, store_key = ""):
     if store_key:
         if store_key in self.stores:
             uri = "https://api.gilt.com/v1/sales/" + store_key + "/upcoming.json"
     else:
         uri = "https://api.gilt.com/v1/sales/upcoming.json"
     resp = get(uri, params=self.query)
     return [make_sale(x) for x in loads(resp.text)["sales"]]
Exemplo n.º 2
0
 def sale_detail(self, store_key, sale_key):
     uri = "https://api.gilt.com/v1/sales/" + store_key + "/" + sale_key + "/detail.json"
     resp = get(uri, params=self.query)
     return make_sale(loads(resp.text))