Skip to content

Commit

Permalink
Update the documentation [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
cedx committed Jan 26, 2024
1 parent 0fb45df commit 9e9773b
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ npm install @cedx/akismet
### 2. Import it
Now in your [JavaScript](https://developer.mozilla.org/docs/Web/JavaScript) code, you can use:

```javascript
```js
import * as akismet from "@cedx/akismet";
```
6 changes: 3 additions & 3 deletions docs/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ or `Author.email` set to `"[email protected]"`. Populate all o
The Akismet API will always return a `CheckResult.spam` response to a valid request with one of those values.
If you receive anything else, something is wrong in your client, data, or communications.

```javascript
```js
import console from "node:console";
import {Author, Blog, Client, Comment} from "@cedx/akismet";

Expand All @@ -34,7 +34,7 @@ and all other required fields populated with typical values.

The Akismet API will always return a `CheckResult.ham` response. Any other response indicates a data or communication problem.

```javascript
```js
import console from "node:console";
import {Author, AuthorRole, Blog, Client, Comment} from "@cedx/akismet";

Expand All @@ -58,7 +58,7 @@ Enable the `Client.isTest` option in your tests.
That will tell Akismet not to change its behaviour based on those API calls: they will have no training effect.
That means your tests will be somewhat repeatable, in the sense that one test won't influence subsequent calls.

```javascript
```js
import {Author, Blog, Client, Comment} from "@cedx/akismet";

const blog = new Blog({url: "https://www.yourblog.com"});
Expand Down
4 changes: 2 additions & 2 deletions docs/usage/check_comment.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ This is the call you will make the most. It takes a number of arguments and char
and then returns a thumbs up or thumbs down. **Performance can drop dramatically if you choose to exclude data points.**
The more data you send Akismet about each comment, the greater the accuracy. We recommend erring on the side of including too much data.

```javascript
```js
Client.checkComment(comment: Comment): Promise<CheckResult>
```

Expand Down Expand Up @@ -32,7 +32,7 @@ See [Response Error Codes](https://akismet.com/developers/errors) for more infor

## Example

```javascript
```js
import console from "node:console";
import {Author, Blog, CheckResult, Client, Comment, CommentType} from "@cedx/akismet";

Expand Down
4 changes: 2 additions & 2 deletions docs/usage/submit_ham.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
This call is intended for the submission of false positives - items that were incorrectly classified as spam by Akismet.
It takes identical arguments as [comment check](usage/check_comment.md) and [submit spam](usage/submit_spam.md).

```javascript
```js
Client.submitHam(comment: Comment): Promise<void>
```

Expand Down Expand Up @@ -30,7 +30,7 @@ See [Response Error Codes](https://akismet.com/developers/errors) for more infor

## Example

```javascript
```js
import console from "node:console";
import {Author, Blog, Client, Comment} from "@cedx/akismet";

Expand Down
4 changes: 2 additions & 2 deletions docs/usage/submit_spam.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Submit spam
This call is for submitting comments that weren't marked as spam but should have been.

```javascript
```js
Client.submitSpam(comment: Comment): Promise<void>
```

Expand Down Expand Up @@ -32,7 +32,7 @@ See [Response Error Codes](https://akismet.com/developers/errors) for more infor

## Example

```javascript
```js
import console from "node:console";
import {Author, Blog, Client, Comment} from "@cedx/akismet";

Expand Down
4 changes: 2 additions & 2 deletions docs/usage/verify_key.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Key verification authenticates your API key before calling the [comment check](usage/check_comment.md),
[submit spam](usage/submit_spam.md) or [submit ham](usage/submit_ham.md) methods.

```javascript
```js
Client.verifyKey(): Promise<boolean>
```

Expand All @@ -26,7 +26,7 @@ See [Response Error Codes](https://akismet.com/developers/errors) for more infor

## Example

```javascript
```js
import console from "node:console";
import {Blog, Client} from "@cedx/akismet";

Expand Down

0 comments on commit 9e9773b

Please sign in to comment.