haxebanana

Haxe interface library for the Game Banana API
https://github.com/melodiiCam2B/haxebanana/

To install, run:

haxelib install haxebanana 1.0.2 

See using Haxelib in Haxelib documentation for more information.

README.md

HaxeBanana


a Haxe Library for interacting with the GameBanana API!

the library gives easier access to the API data any given GameBanana page as well as allowing you to download any and/or all of the files on it


Variables

variables not listed here are not intended to be used normally all though you can access them, due to most of them being public

/**
 * variables in `HxBanana`
 * 
 * @param contID the only manual variable, responsible for setting the current `mod`
 * @param loader initial parser for the gamebanana API
 * @param downloads initial parser for the gamebanana files list
 * @param updater class used to download files from gamebanana
 * @param downloadPath path downloads are written into
 * 
 * arrays used to store data
 * @param data_array used to store update data
 * @param file_array used to store downloadable file data
 * 
 */

Usage


import haxebanana.HxBanana;

class Main {
	static function main():Void {
        // initialize with the mod page id
        var banana = new HxBanana(000000);
        // once it's initialized, everything should work

        // this path gets set on initialization to the absolute path
        banana.downloadPath = '.temp/';
        // new path (Drive:)/env/.temp/updatefile.zip

        // download the second file of latest update
        // if no file that high exists, it's wrapped
        banana.updateByInt(0, 1);
        // empty <- downloads the latest update and first file

        // download specific file id or name
        // if no file by that name or id exists, throws null
        banana.updateByStr('updatefile.zip');
        // recommended for mods that update for multiple OS'
        }
}

Contributors
Melodii2b
Version
1.0.2
Published
5 months ago
License
MIT

All libraries are free

Every month, more than a thousand developers use Haxelib to find, share, and reuse code — and assemble it in powerful new ways. Enjoy Haxe; It is great!

Explore Haxe

Haxe Manual

Haxe Code Cookbook

Haxe API documentation

You can try Haxe in the browser! try.haxe.org

Join us on GitHub!

Haxe is being developed on GitHub. Feel free to contribute or report issues to our projects.

Haxe on GitHub

⌂