Skip to content

Latest commit

 

History

History
69 lines (48 loc) · 1.09 KB

README.MD

File metadata and controls

69 lines (48 loc) · 1.09 KB

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