Example #1
0
def getPackInfo(pack):

    global currentPack
    currentPack = SolderPack()
    rawJSON = urllib2.urlopen('http://solder.technicpack.net/api/modpack/' + pack).read()
    modpackJSON = json.loads(rawJSON)
    currentPack.setModpack(
        modpackJSON['display_name'], modpackJSON['name'], modpackJSON['url'], modpackJSON['recommended'], modpackJSON['latest'], modpackJSON['builds'])
    currentPack.setTargetMC(packMC(pack, modpackJSON['recommended']))
Example #2
0
def getPackInfo(pack):

    global currentPack
    currentPack = SolderPack()
    rawJSON = urllib2.urlopen('http://solder.technicpack.net/api/modpack/' + pack).read()
    modpackJSON = json.loads(rawJSON)
    if 'error' in modpackJSON:
        parser.error("Invalid Modpack - No modpack found")
        sys.exit(3)
    currentPack.setModpack(
        modpackJSON['display_name'], modpackJSON['name'], modpackJSON['url'], modpackJSON['recommended'], modpackJSON['latest'], modpackJSON['builds'])