git ssb

0+

cel / ssb-wikimedia



Commit 3f6da406d8217032f93b552b50bee8ca2384591a

Rename pageHash property to pageId

cel committed on 12/1/2019, 4:12:53 AM
Parent: 7bee17f3e0e13e8eeb7a30b4f1f3669791b2c326

Files changed

README.mdchanged
bin.jschanged
README.mdView
@@ -23,9 +23,9 @@
2323 with the following change:
2424
2525 - Message type is added.
2626 - Property "site" refers to the Wikimedia site base URL.
27-- Property `pageHash` is a [denormalization](https://en.wikipedia.org/wiki/Denormalization) used to facilitate querying SSB for an article. It is the SSB blob hash of the values for the site property and title property, separated by a tab ("\t").
27 +- Property `pageId` is a [denormalization](https://en.wikipedia.org/wiki/Denormalization) used to facilitate querying SSB for an article. It is the SSB blob hash of the values for the site property and title property, separated by a tab ("\t").
2828 - Content ("*" property in revision slots) is replaced with the id of the SSB blob containing that content, at property "link".
2929 - Property "parents" is an array of links to the latest previous message(s) of the same type for the same page containing previous revisions to the page. Any revision parent id referenced from the current message should be found in the current message or a message referenced in this parents array.
3030
3131 Example:
@@ -36,9 +36,9 @@
3636 "pageid": 77777777,
3737 "ns": 0,
3838 "site": "https://en.example.org/",
3939 "title": "Article Title",
40- "pageHash": "&...sha256",
40 + "pageId": "&...sha256",
4141 "parents": [
4242 "%...sha256",
4343 ],
4444 "revisions": [
bin.jsView
@@ -216,9 +216,9 @@
216216 var maxRevMsgId
217217 pull(
218218 sbot.links({
219219 dest: pageInfo.hash,
220- rel: 'pageHash',
220 + rel: 'pageId',
221221 values: true,
222222 meta: false
223223 }),
224224 pull.filter(function (msg) {
@@ -340,9 +340,9 @@
340340 var content = {
341341 type: 'wikimedia/revisions',
342342 site: pageInfo.site,
343343 title: pageInfo.title,
344- pageHash: pageInfo.hash,
344 + pageId: pageInfo.hash,
345345 parents: prevId ? [prevId] : undefined,
346346 revisions: queuedRevisions.splice(0)
347347 }
348348 revisions(null, function next(end, revision) {

Built with git-ssb-web