monosodiumplusplus

This library takes data from e926 (defaulted) or e621 (chosen) using HTTP GET Requests
https://github.com/MonekyTheShep/MonoSodiumPlusPlus

To install, run:

haxelib install monosodiumplusplus 1.9.0 

See using Haxelib in Haxelib documentation for more information.

README.md

MonoSodiumPlusPlus

Matter

Basic e621 wrapper in haxe. This library is not thread safe.

Warning: This library defaults to the e926 (sfw version). Changing the args may expose adult content. Use responsibly.

TODO

More endpoints
Custom requests for PATCH and DELETE
Javascript Support

Example Usage

var monosodium:MonoSodiumPlusPlus = new MonoSodiumPlusPlus();

// for e621 support add MonosodiumFlavor.E621 to the args of MonosodiumPlusPlus

monosodium.login("username", "api_token");

final POST_ID:Int = 5833293;

// search individual post
monosodium.post.search(
        POST_ID,
        postData -> {   
            trace("Post ID: ", postData.post.id);
        }, 
        err -> trace("Error: " + err));

// search multiple posts with tags
final PAGE_NUMBER:Int = 1;
final POST_LIMIT:Int = 20;

monosodium.posts.search({tags: ["femboy", "-female"], page: PAGE_NUMBER, limit: POST_LIMIT},
        postsData -> {
                for(post in postsData.posts) {
                        trace("Post ID: ", post.id);
                }
        }, 
        err -> trace("Error: " + err));

// pull a random post with tags
monosodium.randomPost.search(
        {tags: ["femboy", "-female"]},
        postData -> {   
                trace("Post ID: ", postData.post.id);
        },
        err -> trace("Error: " + err));
Contributors
MonekyTheShep
Version
1.9.0
Published
8 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

⌂