nekobot-api
Advanced tools
Comparing version 1.5.0 to 2.0.0
@@ -1,4 +0,2 @@ | ||
export * from "./src/NekoBot"; | ||
export * from "./src/ImageEndpoint"; | ||
export * from "./src/ImageGeneration"; | ||
export * from "./src/Types"; | ||
import NekoBot from "./classes/NekoBot"; | ||
export { NekoBot }; |
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __exportStar = (this && this.__exportStar) || function(m, exports) { | ||
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p); | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
__exportStar(require("./src/NekoBot"), exports); | ||
__exportStar(require("./src/ImageEndpoint"), exports); | ||
__exportStar(require("./src/ImageGeneration"), exports); | ||
__exportStar(require("./src/Types"), exports); | ||
//# sourceMappingURL=index.js.map | ||
exports.NekoBot = void 0; | ||
const NekoBot_1 = __importDefault(require("./classes/NekoBot")); | ||
exports.NekoBot = NekoBot_1.default; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7O0FBQUEsZ0VBQXdDO0FBRS9CLGtCQUZGLGlCQUFPLENBRUUifQ== |
{ | ||
"name": "nekobot-api", | ||
"version": "1.5.0", | ||
"version": "2.0.0", | ||
"description": "NekoBot API wrapper for Node.js", | ||
"main": "dist/index.js", | ||
"types": "dist/index.d.ts", | ||
"files": [ | ||
"dist/**/*" | ||
], | ||
"scripts": { | ||
"test": "eslint --ignore-path .gitignore \"src/**/*.ts\" && npm run compile", | ||
"compile": "tsc -p .", | ||
"pretty": "prettier --write \"src/*\"", | ||
"doc": "typedoc --ignoreCompilerErrors" | ||
"build": "tsc", | ||
"lint": "eslint --ignore-path .gitignore \"**/*.ts\"", | ||
"lint:fix": "yarn lint --fix", | ||
"test": "yarn lint && yarn build", | ||
"release": "standard-version", | ||
"docs": "typedoc" | ||
}, | ||
@@ -18,5 +23,8 @@ "repository": { | ||
"keywords": [ | ||
"api", | ||
"neko", | ||
"nekobot", | ||
"api", | ||
"wrapper", | ||
"nsfw", | ||
"images", | ||
"anime", | ||
"discord" | ||
@@ -31,22 +39,10 @@ ], | ||
"devDependencies": { | ||
"@types/node": "^14.0.14", | ||
"@typescript-eslint/eslint-plugin": "^3.2.0", | ||
"@typescript-eslint/parser": "^3.2.0", | ||
"eslint": "^7.2.0", | ||
"eslint-config-standard": "^14.1.1", | ||
"eslint-plugin-import": "^2.21.2", | ||
"eslint-plugin-node": "^11.1.0", | ||
"eslint-plugin-promise": "^4.2.1", | ||
"eslint-plugin-standard": "^4.0.1", | ||
"prettier": "^2.0.5", | ||
"typedoc": "^0.17.8", | ||
"typescript": "^3.8.2" | ||
}, | ||
"dependencies": {}, | ||
"prettier": { | ||
"trailingComma": "none", | ||
"tabWidth": 4, | ||
"semi": true, | ||
"singleQuote": false | ||
"@types/node": "^14.11.8", | ||
"@typescript-eslint/eslint-plugin": "^4.4.1", | ||
"@typescript-eslint/parser": "^4.4.1", | ||
"eslint": "^7.11.0", | ||
"standard-version": "^9.0.0", | ||
"typedoc": "^0.19.2", | ||
"typescript": "^4.0.3" | ||
} | ||
} |
@@ -1,6 +0,5 @@ | ||
# nekobot-api [![CircleCI](https://circleci.com/gh/Allvaa/nekobot-api.svg?style=svg)](https://circleci.com/gh/Allvaa/nekobot-api) [![Depedencies](https://img.shields.io/david/Allvaa/nekobot-api.svg)](https://david-dm.org/Allvaa/nekobot-api) | ||
[NekoBot](https://nekobot.xyz/) API wrapper for Node.js | ||
# nekobot-api ![npm](https://img.shields.io/npm/v/nekobot-api) | ||
[NekoBot API](https://docs.nekobot.xyz/ "NekoBot API") wrapper for Node.js | ||
## Installing | ||
[![Version](https://nodei.co/npm/nekobot-api.png?compact=true)](https://nodei.co/npm/nekobot-api) | ||
```sh | ||
@@ -17,10 +16,16 @@ # npm | ||
const { NekoBot } = require("nekobot-api"); | ||
const api = new NekoBot("token"); // token are only needed for donator types in Image Endpoint. so you can leave it empty. | ||
const api = new NekoBot(); | ||
async function run() { | ||
let image = await api.imageGen.magik("image url"); // returns a string. | ||
// imagegen endpoint | ||
(async () => { | ||
const image = await api.generate("magik", { image: "image url" }); | ||
console.log(image); | ||
} | ||
run(); | ||
})(); | ||
// image endpoint | ||
(async () => { | ||
const image = await api.get("food"); | ||
console.log(image); | ||
})(); | ||
``` | ||
[Documentation](https://nba.allvzx.website) | ||
[Documentation](https://allvaa.github.io/nekobot-api) |
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
7
30
17757
18
249
3