Skip to content

An unofficial wrapper for amethyste-api written in typescript

License

Notifications You must be signed in to change notification settings

apoorvcodes/amethyste-client

Repository files navigation

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

About

An unofficial wrapper for amethyste-api written in typescript

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published