0.2.0 • Published 3 years ago

ssb-meta-feeds-rpc v0.2.0

Weekly downloads
-
License
LGPL-3.0
Repository
github
Last release
3 years ago

SSB meta feeds RPC

A secret stack plugin adding meta feeds subset replication related RPCs.

Requires the ssb-meta-feeds module loaded as a secret stack plugin.

Implements the spec

API

getSubset

examples:

pull(
  sbot.getSubset({
    op: 'and',
    args: [
      { op: 'type', string: 'post' },
      { op: 'author', feed: '@6CAxOI3f+LUOVrbAl0IemqiS7ATpQvr9Mdw9LC4+Uv0=.ed25519' }
    ]
  }),
  pull.collect((err, results) => {
    console.logs("posts for arj", results)
  })
)

pull(
  sbot.getSubset({
    op: 'and',
    args: [
      { op: 'type', string: 'post' },
      { op: 'author', feed: '@6CAxOI3f+LUOVrbAl0IemqiS7ATpQvr9Mdw9LC4+Uv0=.ed25519' }
    ]
  }, {
    descending: true,
    pageSize: 10
  }),
  pull.collect((err, results) => {
    console.logs("latest 10 posts for arj", results)
  })
)

resolveIndexFeed

pull(
  sbot.resolveIndexFeed(indexFeedId),
  pull.collect((err, results) => {
    console.logs("index feed and the indexed messages", results)
    // [{ msg: indexMsg, indexed: contactMsg }, ...]
  })
)
0.2.0

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.3

3 years ago

0.1.0

3 years ago