MonoSodiumPlusPlus
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));