Example #1
0
 def next(self,itemType):
     result = None
     try: 
         req = GetRequest(self.url)
         req.query("status", "QUEUED").query("type", itemType)
         req.header('Authorization', self.api_auth)
         resp = req.open()
         obj = json.load(resp)
         if len(obj["objects"]) > 0:
             result = obj["objects"][0]
     except urllib2.HTTPError, e:
         #Got an error
         None