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
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
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