1.0.2 • Published 8 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
8 months ago
1.0.5-dev
8 months ago
1.0.54-dev
8 months ago
1.0.51-dev
8 months ago
1.0.53-dev
8 months ago
1.0.55-dev
8 months ago
1.0.2
8 months ago
1.0.4
8 months ago
1.0.3
8 months ago
1.0.1
10 months ago
1.0.0
10 months ago
0.1.1
11 months ago
0.1.0
11 months ago
0.0.10
11 months ago
0.0.8
12 months ago
0.0.7
12 months ago
0.0.6
12 months ago
0.0.5
12 months ago
0.0.4
12 months ago
0.0.3
12 months ago
0.0.2
12 months ago
0.0.1
12 months ago