Friends, follows, blocks, invites #14

Closed
opened 2022-01-13 19:30:17 +00:00 by notplants · 2 comments
Owner

For the next set of features needed for PeachCloud, we may need to add more additional features to kuska:

  • friends
  • follows
  • followers
  • blocks
  • create invite

Some of these commands, using sbotcli, but what are the exact muxrpc calls to make?

  • sbotcli friends hops --dist 0
    (what are the other friends commands, for getting follows, followers and blocks?)

  • sbotcli invite create --uses 100

For the next set of features needed for PeachCloud, we may need to add more additional features to kuska: - friends - follows - followers - blocks - create invite Some of these commands, using sbotcli, but what are the exact muxrpc calls to make? - sbotcli friends hops --dist 0 (what are the other friends commands, for getting follows, followers and blocks?) - sbotcli invite create --uses 100
Owner

@notplants

The follow-related calls in sbotcli are defined in friend.go. The code there gives me a basic idea of the required MUX-RPC calls:

muxrpc.Method{"friends", "isFollowing"}, arg

muxrpc.Method{"friends", "hops"}, arg

muxrpc.Method{"friends", "blocks"}, args...

The API docs for the JS ssb-friends module fills in most of the blanks (the README has detailed docs about each method):

ssb.friends.isFollowing(opts, cb) ("async" muxrpc API)

ssb.friends.hops([opts,] cb) ("async" muxrpc API)

ssb.friends.isBlocking(opts, cb) ("async" muxrpc API)

Here is the Go code for accepting / using an invite (legacy.go):

muxrpc.Method{"invite", "use"}, param

And creating:

muxrpc.Method{"invite", "create"}

I'm not entirely sure of the shape of the optional parameters for invite creation (the uses flag), but I should be able to figure it out with some tinkering.

@notplants The follow-related calls in sbotcli are defined in [`friend.go`](https://github.com/cryptoscope/ssb/blob/a781ad4ee51523df1d3858d9859c285d0eeb2fb1/cmd/sbotcli/friends.go). The code there gives me a basic idea of the required MUX-RPC calls: ```go muxrpc.Method{"friends", "isFollowing"}, arg muxrpc.Method{"friends", "hops"}, arg muxrpc.Method{"friends", "blocks"}, args... ``` The API docs for the JS [`ssb-friends`](https://github.com/ssbc/ssb-friends) module fills in most of the blanks (the README has detailed docs about each method): ```javascript ssb.friends.isFollowing(opts, cb) ("async" muxrpc API) ssb.friends.hops([opts,] cb) ("async" muxrpc API) ssb.friends.isBlocking(opts, cb) ("async" muxrpc API) ``` Here is the Go code for accepting / using an invite ([`legacy.go`](https://github.com/cryptoscope/ssb/blob/master/invite/legacy.go)): ```go muxrpc.Method{"invite", "use"}, param ``` And creating: ```go muxrpc.Method{"invite", "create"} ``` I'm not entirely sure of the shape of the optional parameters for invite creation (the `uses` flag), but I should be able to figure it out with some tinkering.
Owner

This functionality has now been implemented, both in kuska and golgi.

This functionality has now been implemented, both in kuska and golgi.
glyph closed this issue 2022-02-15 13:02:29 +00:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: golgi-ssb/golgi#14
No description provided.