Skip to content

Commit

Permalink
Merge pull request #2 from SkynetLabs/changes-for-the-feed-dac
Browse files Browse the repository at this point in the history
Changes for the feed DAC
  • Loading branch information
MSevey authored Apr 14, 2021
2 parents d3128a7 + 316af4b commit bebfca4
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 18 deletions.
7 changes: 4 additions & 3 deletions draft-01/example.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
{
"$schema": "../draft-01/feedPage.schema.json",
"userId": "d448f1562c20dbafa42badd9f88560cd1adb2f177b30f0aa048cb243e55d37bd",
"_self": "sky://ed25519-d448f1562c20dbafa42badd9f88560cd1adb2f177b30f0aa048cb243e55d37bd/skyfeed-dev.hns/localhost/posts/page_1.json",
"items": [
{
"id": 0,
"commentTo": "a3a35179d69a191ccb6329dcc0c2aaac2cada7ce145cbbd5543c8c2ee97e2a4a/feed/comments/102123/123213",
"parentHash": "sha256:9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08",
"commentTo": "sky://ed25519-9887c9b067418549277a5f990e468b33d57f959cb08d8663f9563c376d0c9b34/skyfeed-dev.hns/localhost/posts/page_0.json#0",
"parentHash": "122041dd7b6443542e75701aa98a0c235951a28a0d851b11564d20022ab11d2589a8",
"ts": 1618130245000,
"content": {
"link": "sia://hackerpaste.hns/#AACxgn3_eeq4yScptvec8aViIsNvsahDO8Z8EAFQ87aLSQugUdJE-YeTvjeTBiVsjg",
"linkTitle": "HackerPaste Link",
Expand Down
9 changes: 4 additions & 5 deletions draft-01/feedPage.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,13 @@
"description": "A representation of a page of a feed",
"type": "object",
"required": [
"userId",
"_self",
"items"
],
"properties": {
"userId": {
"type": "string",
"description": "This is the global userId used for the profile (for example by SkyID), not the scope-specific public key (To ensure interoperability)",
"pattern": "^[\\da-f]{64}$"
"_self": {
"$ref": "../draft-01/postReference.schema.json",
"description": "Reference to this page"
},
"items": {
"type": "array",
Expand Down
8 changes: 7 additions & 1 deletion draft-01/post.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"description": "A representation of a post",
"type": "object",
"required": [
"id"
"id",
"ts"
],
"properties": {
"id": {
Expand Down Expand Up @@ -40,6 +41,11 @@
},
"content": {
"$ref": "../draft-01/postContent.schema.json"
},
"ts": {
"type": "integer",
"description": "Unix timestamp (in milliseconds) when this post was created/posted",
"minimum": 0
}
}
}
5 changes: 0 additions & 5 deletions draft-01/postContent.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,6 @@
},
"description": "Can be used by applications to add more metadata"
},
"ts": {
"type": "integer",
"description": "Unix timestamp (in millisecons) when this post was created/posted",
"minimum": 0
},
"lang": {
"type": "string",
"description": "ISO 639-1 Alpha-2 language code",
Expand Down
9 changes: 5 additions & 4 deletions draft-01/postReference.schema.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
{
"$id": "https://skystandards.hns.siasky.net/draft-01/postReference.schema.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "A reference to a Post",
"description": "A reference to a Post",
"title": "A reference to a Post or FeedPage",
"description": "A reference to a Post or FeedPage (sky://USERID/DAC/SKAPP/FEED/PAGE#INDEX)",
"type": "string",
"pattern": "^[\\da-f]{64}\\/feed\\/\\w+\\/\\d+\\/\\d+$",
"pattern": "^sky:\\/\\/ed25519-[\\da-f]{64}\\/[a-z\\.\\-]+\\/[a-z\\.\\-]+\\/[a-z\\.\\-]+\\/[\\w_\\.]+(#\\d+)?$",
"examples": [
"5335179d69a3191ccb6329dcc0d2aaac2cada7ce145cbbd5543c8c2ee97e2a4a/feed/posts/0/11"
"sky://ed25519-9887c9b067418549277a5f990e468b33d57f959cb08d8663f9563c376d0c9b34/skyfeed-dev.hns/localhost/posts/page_0.json#0",
"sky://ed25519-d448f1562c20dbafa42badd9f88560cd1adb2f177b30f0aa048cb243e55d37bd/skyfeed-dev.hns/localhost/posts/page_1.json"
]
}

0 comments on commit bebfca4

Please sign in to comment.