Skip to content

Anime girls holding programming books API wrapper for πŸ”₯ mojo.

Notifications You must be signed in to change notification settings

THEGOLDENPRO/aghpb.mojo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ”₯ aghpb.mojo πŸ“š

Mojo API wrapper for the anime girls holding programming books API


Note

This is part of my aghpb api wrapper challenge where I attempt to write an api wrapper in every language possible. So yes expect spaghetti code as it will be my first time writing in these languages. Although I'm 100% open to improvements and corrections so feel free to contribute anything. Other languages I've done

Warning

This is BROKEN and INCOMPLETE because THIS LANGUAGE IS INCOMPLETE!!! πŸ˜‘πŸ’’

Install

idk, this is fucking mojo. It hasn't even been released yet.

so read their docs and find out yourself if you're so nerdy: https://docs.modular.com/mojo/manual/packages.html

Examples

This is how you may retrieve a random anime girls holding programming books:

from python import Python

from aghpb import Client

fn main() raises:
    let python = Python.import_module("builtins")

    let client = Client()
    let book = client.random()

    print(book.name)
    print(book.category)
    print(book.date_added)

    # We have to use python's file open function as mojo's variant is just not working correctly for me.
    let file = python.open("./anime_girl.png", "wb")
    _ = file.write(book.image_bytes)
    _ = file.close()

    # This is how we would have done it in mojo if it wasn't so bad rn.

    # var file = open("./anime_girl.png", "wb")
    # file.write(book.image_bytes)
    # file.close()

and yes categories don't fucking work because OF THIS DUMB.... 😠 alright let's take a chill pill

btw you can run that example if you git clone the repo and run mojo examples/random_book.πŸ”₯.


Made using my API at πŸ‘‰ https://api.devgoldy.xyz/aghpb/v1/

About

Anime girls holding programming books API wrapper for πŸ”₯ mojo.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published