Files: 254c89b83aef67583e5b1b6f6cd5fdba4fb0b493 / tmpl / docs / social / follow-users.html.js
1172 bytesRaw
1 | var page = require('../../page.part') |
2 | var com = require('../../com.part') |
3 | |
4 | module.exports = () => page({ |
5 | section: 'docs', |
6 | tab: 'docs-social', |
7 | path :'/docs/social/follow-users.html', |
8 | content: ` |
9 | <p> |
10 | Following is controlled by <code>type:contact</code> messages that are published on the user${"'"}s feed. |
11 | </p> |
12 | |
13 | <h2>Follow users</h2> |
14 | ${ com.code({ js: jsSnippet1, bash: bashSnippet1 }) } |
15 | |
16 | <h2>Unfollow users</h2> |
17 | ${ com.code({ js: jsSnippet2, bash: bashSnippet2 }) } |
18 | |
19 | <p class="next"><a href="/docs/social/query-the-social-graph.html">Query the social graph</a></p> |
20 | <ul class="see-also"> |
21 | <li><a href="/advanced/message-schemas.html">Message schemas</a></li> |
22 | <li><a href="/advanced/linking-messages.html">Linking messages</a></li> |
23 | </ul> |
24 | ` |
25 | }) |
26 | |
27 | var jsSnippet1 = ` |
28 | sbot.publish({ |
29 | type: 'contact', |
30 | contact: userId, |
31 | following: true |
32 | }, cb) |
33 | ` |
34 | |
35 | var bashSnippet1 = ` |
36 | sbot publish --type contact --contact {userId} --following |
37 | ` |
38 | |
39 | var jsSnippet2 = ` |
40 | sbot.publish({ |
41 | type: 'contact', |
42 | contact: userId, |
43 | following: false |
44 | }, cb) |
45 | ` |
46 | |
47 | var bashSnippet2 = ` |
48 | sbot publish --type contact --contact {userId} --no-following |
49 | ` |
Built with git-ssb-web