git ssb

0+

mixmix / ssb-meme



Commit 05dce8efde8561c6434c976bb1142af9fe031973

add README

mix irving committed on 5/27/2018, 11:53:32 AM
Parent: 8ea0672560e531ebb37c8697fcd37dad9a96986e

Files changed

package.jsonchanged
README.mdadded
package.jsonView
@@ -1,19 +1,20 @@
11 {
22 "name": "ssb-meme",
3- "version": "1.0.0",
3 + "version": "0.0.0",
44 "description": "",
55 "main": "index.js",
6 + "repository": "https://github.com/ssbc/ssb-meme",
67 "directories": {
78 "test": "test"
89 },
910 "dependencies": {
10- "file-type": "^8.0.0",
1111 "flumeview-search": "^1.0.3",
1212 "is-my-json-valid": "^2.17.2",
1313 "ssb-ref": "^2.11.1"
1414 },
1515 "devDependencies": {
16 + "file-type": "^8.0.0",
1617 "pull-stream": "^3.6.8",
1718 "scuttlebot": "^11.3.0",
1819 "ssb-blobs": "^1.1.5",
1920 "ssb-config": "^2.2.0",
@@ -23,6 +24,6 @@
2324 "test": "echo \"Error: no test specified\" && exit 1"
2425 },
2526 "keywords": [],
2627 "author": "",
27- "license": "ISC"
28 + "license": "MIT"
2829 }
README.mdView
@@ -1,0 +1,45 @@
1 +# ssb-meme
2 +
3 +Uses [flumeview-search](https://github.com/flumedb/flumeview-search) to build an index of all images names.
4 +
5 +## Example Usage
6 +
7 +```js
8 +var Scuttlebot = require('scuttlebot')
9 +
10 +Scuttlebot
11 + .use(require('scuttlebot/plugins/master'))
12 + .use(require('ssb-memes'))
13 +
14 +var sbot = Scuttlebot(config) // see test/index.js for details
15 +
16 +sbot.meme.search('hermes', (err, results) => {
17 + // ...
18 +})
19 +```
20 +
21 +
22 +## API
23 +
24 +### `sbot.meme.search(query, callback)`
25 +
26 +- `query` must be a string at least 3 characters long
27 +- `callback` recieves results as an object of form:
28 +
29 +```js
30 +{
31 + '&234x234lass...': [
32 + { name: 'hermes-spade', author:'@ye+4...', msg: '%q24dad323...' }
33 + { name: 'hermes-wacka', author:'@mox5...', msg: '%asdasd696...' }
34 + //...
35 + ]
36 + //...
37 +}
38 +```
39 +
40 +msg is the message where this mention occured
41 +
42 +### `sbot.meme.query`
43 +
44 +this is the raw method provided by flumeview-search. Not recommended for general use
45 +

Built with git-ssb-web