1.0.2 โ€ข Published 2 years ago

amethyste-client v1.0.2

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

Amethyste Client

An unofficial wrapper for Amethyste-Api written in TypeScript

โš™๏ธ Setup

//yarn
yarn add amethyste-client

//npm 
npm i amethyste-client

๐Ÿ“‘ Usage

Note : You can get your api key here

JavaScript

const amiapi = require("amethyste-client")

const Client = amiapi("UR_TOKEN")

Client.generate({
	endpoint: "beautiful",
	options: {
		"url": client.user.avatarURL
	}
}).then(img => {
	console.log(img)
})

TypeScript

import amiapi from "amethyste-client"

const Client:amiapi = amiapi("UR_TOKEN")

Client.generate({
	endpoint: "beautiful",
	options: {
		"url": client.user.avatarURL
	}
  }).then(img => {
	console.log(img)
})

Response

{
  "status": 200,
  "url": "https://cdn.amethyste.moe/wallpaper14ebdfb3f9a9e4025b54ab759f1ad9e60bd0.jpg"
}

๐Ÿงพ Endpoints

For endpoints and options kindly refer here at the docs