Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Add book reviews
  • Loading branch information
Jon Staab committed Mar 25, 2025
commit 3f9568784ba0c0c06bb6f11ab09e1b57d71fcccf
36 changes: 27 additions & 9 deletions 85.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,34 +6,36 @@ Reviews

This NIP describes several different types of `review` which follow a single set of conventions.

In all cases, the `content` field SHOULD include a human-readable review.

Review events' `d` tag indicates the object of the review. This MUST take the form of a [NIP 73](./73.md) id. This allows for reviews of events, people, topics, relays, or external guids without ambiguity.
In all cases, the `content` field SHOULD include a human-readable review. A review event's `d` tag indicates the object of the review.

# Ratings

Tags MAY contain additional `rating` tags each of which should have a `value` between 0 and 1,
and an optional `mark` specifying an attribute of the thing being reviewed.

# Review Kinds

## Event

Kind `31986` indicates a review of any event generated by a `pubkey`.
The `e` tag MUST be the `id` of the event.
The `p` tag MUST be the `pubkey` of the event.
Kind `31986` indicates a review of any event generated by a `pubkey`.

- The `d` tag MUST be the `id` of the event.
- The `p` tag MUST be the `pubkey` of the event.

```json
{
"kind": 31986,
"content": "Always publishing quality information about breaking news all over the world.",
...
"tags": [
["d", `<event id>:<pubkey>`]
["e", "dcd59..464a2"]
["p", "968c5..ad7a4"],
["d", "<event-id>"]
["p", "<pubkey>"],
["k", "1"],
["rating", "0.8"]
],
}
```

## Relays

Kind `31987` indicates a review of a relay. The `d` tag MUST be the url of the relay.
Expand All @@ -50,3 +52,19 @@ Kind `31987` indicates a review of a relay. The `d` tag MUST be the url of the r
],
}
```

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
```

Book Review

Kind 31025 indicates a review of a book. The d tag SHOULD take the form of a NIP 73 id or resulting hash of the id.
The k tag MUST be isbn.
The raw tag provides an optional field for raw rating values to be added as a fallback mechanism or for reference.
One or more t tags may be included as descriptive qualifiers to accompany reviews.

{
  "kind": 31025,
  "content": "Really enjoyed this book!",
  "tags": [
    ["d", `"isbn:9780141030586" or "648370d3279993b70d7f75625d765e08ddcbb4db5262ebd2e9db0d666c0b8412"`]
    ["k", "isbn"]
    ["rating", "0.8"]
    ["raw", "4/5"]
    ["t", "heartwarming"]
    ["t", "captivating"]
  ],
}



## Books

Kind `31985` indicates a review of a book. The `d` tag MUST be a [NIP 73](./73.md) ISBN content ID.

```json
{
"kind": 31985,
"tags": [
["d","isbn:9781529100624"],
["rating", "0.8"]
],
"content": "Good book",
}
```