Ejemplo n.º 1
0
def searchForItemsByName(name, store):

    encodedName = quote(name)
    url = apiRoot+"/bucket_search/"+store+"/"+apiVersion+"/"+encodedName+"?size="+fetchSize+"&start=0"
    data = utils.getJsonResponse(url)
    links = data['categories']['games']['links']
    return links
Ejemplo n.º 2
0
def getItemForCid(cid, store):
    try:
        url = apiRoot + "/container/"+store+"/"+apiVersion+"/"+cid+"?size="+fetchSize
        data = utils.getJsonResponse(url)
        return data
    except Exception as e:
        logging.error("Got error '"+str(e)+"' while retrieving cid '"+cid+"' in store "+store)
        return None
Ejemplo n.º 3
0
def getItemsByContainer(container, store):

    encContainer = quote(container)
    timestamp = timestamp = int(time.time())
    
    url = apiRoot+"/container/"+store+"/"+apiVersion+"/"+container+"/"+str(timestamp)+"?size="+fetchSize

    data = utils.getJsonResponse(url)
    links = data['links']

    return links