You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 15, 2023. It is now read-only.
This package helps you create activity streams & newsfeeds with NodeJS and [GetStream.io](https://getstream.io).
9
+
[stream-node-orm](https://github.com/GetStream/stream-node-orm) is a Node.js (Sails, Waterline) client for [Stream](https://getstream.io/).
10
10
11
-
###Build activity streams & news feeds
11
+
You can sign up for a Stream account at https://getstream.io/get_started.
12
+
13
+
Note there is also a lower level [Node.js - Stream integration](https://github.com/getstream/stream-js) library which is suitable for all JavaScript applications.
14
+
15
+
### Build activity streams & news feeds
12
16
13
17
<palign="center">
14
18
<imgsrc="https://dvqg2dogggmn6.cloudfront.net/images/mood-home.png"alt="Examples of what you can build"title="What you can build"/>
@@ -43,7 +47,7 @@ Install getstream_node package with npm:
43
47
44
48
#### Step 2 - Config file
45
49
46
-
Copy `getstream.js` config file from `node_modules/getstream-node` into the root directory of your application
50
+
Copy `getstream.js` config file from `node_modules/getstream-node` into the root directory of your application
47
51
Make sure you require the getstream-node early on in your application (eg. in app.js)
48
52
49
53
#### Step 3 - Get your API key
@@ -53,7 +57,7 @@ Login with Github on [getstream.io](https://getstream.io/) and edit the configur
53
57
54
58
###Model integration
55
59
56
-
Stream Nodejs can automatically publish new activities to your feeds. To do that you only need to register the models you want to publish with this library.
60
+
Stream Node.js can automatically publish new activities to your feeds. To do that you only need to register the models you want to publish with this library.
57
61
58
62
```js
59
63
var stream =require('getstream-node');
@@ -76,8 +80,8 @@ Every time a Tweet is created it will be added to the user's feed. Users which f
76
80
Models are stored in feeds as activities. An activity is composed of at least the following fields: **actor**, **verb**, **object**, **time**. You can also add more custom data if needed.
77
81
The Activity mixin will try to set things up automatically:
78
82
79
-
**object** is a reference to the model instance
80
-
**actor** is a reference to the user attribute of the instance
83
+
**object** is a reference to the model instance
84
+
**actor** is a reference to the user attribute of the instance
81
85
**verb** is a string representation of the class name
82
86
83
87
By default the actor field will look for an attribute called user or actor and a field called created_at to track creation time.
When needed you can also use the [low level JavaScript API](https://github.com/getstream/stream-js) directly. Documentation is available at the [Stream website](https://getstream.io/docs/?language=js).
241
243
242
244
```js
243
245
var streamNode =require('getstream-node');
244
246
var client =streamNode.FeedManager.client
245
247
// client.addActivity, client.removeActivity etc are all available
246
248
```
247
249
248
-
The full documentation for the low level API is available in the [getstream.io documentation](https://getstream.io/docs/).
249
-
250
250
### Enrichment
251
251
252
252
You can use the enrichment capabilities of this library directly.
By default the enrichment system assumes that you're referencing items by their id. Sometimes you'll want to customize this behaviour. You might for instance use a username instead of an id. Alternatively you might mant to use a caching layer instead of the ORM for loading the data. The example below shows how to customize the lookup for all User entries.
270
+
By default the enrichment system assumes that you're referencing items by their id. Sometimes you'll want to customize this behaviour. You might for instance use a username instead of an id. Alternatively you might mant to use a caching layer instead of the ORM for loading the data. The example below shows how to customize the lookup for all User entries.
271
271
272
272
```js
273
273
// subclass streamMongoose
@@ -312,3 +312,9 @@ npm install
312
312
npm version [ major | minor | patch ]
313
313
npm publish
314
314
```
315
+
=======
316
+
### Copyright and License Information
317
+
318
+
Copyright (c) 2015-2017 Stream.io Inc, and individual contributors. All rights reserved.
319
+
320
+
See the file "LICENSE" for information on the history of this software, terms & conditions for usage, and a DISCLAIMER OF ALL WARRANTIES.
0 commit comments