Git Product home page Git Product logo

aghpb.ts's Introduction

๐ŸŸฆ aghpb.ts ๐Ÿ“š

Typescript API wrapper for the anime girls holding programming books API

npm


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

Install

npm install aghpb

The NPM package can be located here.

Examples

This is how you may retrieve a random anime girl holding a programming book:

import * as fs from "fs";
import { Client } from "aghpb";

const client = new Client();

client.random().then(
    (book) => {
        console.log(`Name: ${book.name}`);
        console.log(`Category: ${book.category}`);
        console.log(`Date Added: ${book.dateAdded}`);

        const buffer = Buffer.from(book.image)

        fs.createWriteStream("./anime_girl.png").write(
            buffer
        );
    }
);

You can also retrieve specific categories of anime girls holding programming books like so:

client.random("typescript");

This is how you may retrieve a list of available categories:

import { Client } from "aghpb";

const client = new Client();

client.categories().then(
    (categories) => {
        categories.forEach((category) => {
            console.log(category);
        })
    }
);

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

aghpb.ts's People

Contributors

emretech avatar thegoldenpro avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

emretech

aghpb.ts's Issues

Implement URL phrasing.

The title says it but here's some more detail:

url += "?category=" + category;

The category string here should probably be encoded so categories like C++ can work and if possible take advantage of a URL builder to add parameters.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.