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
Next Next commit
Add reviews NIP
  • Loading branch information
Jon Staab committed Mar 24, 2025
commit f92d9c8ba10d4fb6ad818e27b856c5617e74ac7c
50 changes: 50 additions & 0 deletions 85.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
NIP-85
======

Reviews
-------

`draft` `optional` `author:staab`

Kind `1986` MAY be used to leave a review with optional ratings.

The `content` field SHOULD include a human-readable review.

The review event MUST include one or more `e`, `a`, `p`, `t`, or `r` tags indicating
the object of the review. This allows for reviews of events, people, topics, and relays
or external resources. As with NIP-01, a relay hint SHOULD be included when using `e` and
`p` tags.

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.

Examples
--------

A relay review with rating metadata.

```json
{
"kind": 1986,
"content": "This relay is fast!",
"tags": [
["rating", "0.8"],
["rating", "0.2", "smell"],
["rating", "1", "service"],
["r", <relay_url>]
],
}
```

A review of a podcast episode.

```json
{
"kind": 1986,
"content": "This was a great episode.",
"tags": [
["rating", "1"],
["r", <podcast guid in a standard format>]
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is post guid a url? If not - how would a general reviews app know how to render this guid? r should contain a url.

Copy link
Member Author

Choose a reason for hiding this comment

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

In the case of podcasts, the guid is a cross-platform standard. In this example there's no l tag, so clients will be pulling reviews based on the r value, presumably they know what that value means. r doesn't need to necessarily contain a url, just a "a reference (URL, etc)" per the README.

],
}
```

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"]
  ],
}