1.0.2 • Published 9 months ago
@ywwa/pnapi v1.0.2
Paynow API (pnApi)
paynow.gg Developer API Wrapper.
Installation
# with NPM
npm install @ywwa/pnapi
# with BUN
bun add @ywwa/pnapi
# ... any other preferred package manager.
Usage/Examples
import { config } from "dotenv";
import { Paynow, UsersApi } from "@ywwa/pnapi";
config();
// Paynow client contains rest of the clients as well
// so you can import everything at once or import apis one by one
const paynow = new Paynow({
auth: {
type: "user",
key: process.env.API_KEY,
},
});
const usersApi = new UsersApi({
auth: {
type: "user",
key: process.env.API_KEY,
},
});
async function main() {
// get current users profile response
const userA = await Paynow.Users.me();
console.log(userA);
const userB = await Users.me();
console.log(userB);
/*
Response {
id: '123456789000000000',
first_name: 'John',
last_name: 'Doe',
email: 'john.doe@mail.com',
created_at: 2024-01-01T00:00:00.000Z
}
*/
}
main();
TODO:
- jsdocs. code is almost completely undocumented.
- unit tests.
- automated builds and published to npm.
- revisit dtos.
- package size?
Note
If you encounter any issues, please open an issue.
1.0.52-dev
9 months ago
1.0.5-dev
9 months ago
1.0.54-dev
9 months ago
1.0.51-dev
9 months ago
1.0.53-dev
9 months ago
1.0.55-dev
9 months ago
1.0.2
9 months ago
1.0.4
9 months ago
1.0.3
9 months ago
1.0.1
11 months ago
1.0.0
11 months ago
0.1.1
1 year ago
0.1.0
1 year ago
0.0.10
1 year ago
0.0.8
1 year ago
0.0.7
1 year ago
0.0.6
1 year ago
0.0.5
1 year ago
0.0.4
1 year ago
0.0.3
1 year ago
0.0.2
1 year ago
0.0.1
1 year ago