10000 docs: document PastebinCredentials · cAttte/pastebin.js@05b7643 · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Jul 6, 2025. It is now read-only.

Commit 05b7643

Browse files
committed
docs: document PastebinCredentials
1 parent e8271e7 commit 05b7643

File tree

1 file changed

+17
-16
lines changed

1 file changed

+17
-16
lines changed

README.md

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ console.log(paste.url)
3030
- [UserStore](#userstore)
3131
- [UserPasteStore](#userpastestore)
3232
- [Typedefs](#typedefs)
33+
- [PastebinCredentials](#pastebincredentials)
3334
- [Format](#format-2)
3435
- [Privacy](#privacy-2)
3536
- [Expiry](#expiry-2)
@@ -72,22 +73,7 @@ new PastebinClient(apiKey, username, password)
7273
#### .credentials
7374

7475
Your Pastebin credentials.
75-
**Type: [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)**
76-
77-
##### credentials.apiKey
78-
79-
Your Pastebin API key.
80-
**Type: ?[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)**
81-
82-
##### credentials.username
83-
84-
Your Pastebin username.
85-
**Type: ?[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)**
86-
87-
##### credentials.password
88-
89-
Your Pastebin password.
90-
**Type: ?[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)**
76+
**Type: [PastebinCredentials](#pastebincredentials)**
9177

9278
#### .user
9379

@@ -484,6 +470,21 @@ Fetch this user's pastes, and store them in the cache.
484470

485471
## Typedefs
486472

473+
### PastebinCredentials
474+
475+
The credentials provided to and stored in the PastebinClient.
476+
477+
**Type:** `{ apiKey?: string, username?: string, password?: string, userKey?: string }`
478+
479+
| name | description | type | default |
480+
| -------- | ------------------------------------------------ | ------ | ------- |
481+
| apiKey | Your Pastebin API key | string | `null` |
482+
| username | Your Pastebin username | string | `null` |
483+
| password | Your Pastebin password | string | `null` |
484+
| userKey | Your Pastebin user key, obtained when logging in | string | `null` |
485+
486+
#### Properties
487+
487488
### Format
488489

489490
A "format," which will be used for syntax highlighting. You can see the full list of formats [here](https://pastebin.com/doc_api#5).

0 commit comments

Comments
 (0)
0