-
Notifications
You must be signed in to change notification settings - Fork 719
Add reviews NIP #879
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Add reviews NIP #879
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
| @@ -0,0 +1,70 @@ | ||||
| NIP-85 | ||||
| ====== | ||||
|
|
||||
| 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. 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 `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>"] | ||||
| ["p", "<pubkey>"], | ||||
| ["k", "1"], | ||||
| ["rating", "0.8"] | ||||
| ], | ||||
| } | ||||
staab marked this conversation as resolved.
Show resolved
Hide resolved
|
||||
| ``` | ||||
|
|
||||
| ## Relays | ||||
|
|
||||
| Kind `31987` indicates a review of a relay. The `d` tag MUST be the url of the relay. | ||||
|
|
||||
| ```json | ||||
| { | ||||
| "kind": 31987, | ||||
| "content": "This relay is fast!", | ||||
| "tags": [ | ||||
| ["d", "wss://relay.example.com/"], | ||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Imo it should be namespaced otherwise there could be collisions with urls of other protocols that use websockets
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's already namespaced, that's what kinds are for
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Lol, my bad got confused between nips |
||||
| ["rating", "0.8"], | ||||
| ["rating", "0.2", "content"], | ||||
| ["rating", "1", "speed"] | ||||
| ], | ||||
| } | ||||
| ``` | ||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Book ReviewKind {
"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", | ||||
| } | ||||
| ``` | ||||
Uh oh!
There was an error while loading. Please reload this page.