getstream
Advanced tools
Comparing version 1.0.0 to 1.0.2
{ | ||
"name": "getstream", | ||
"version": "1.0.0", | ||
"version": "1.0.2", | ||
"main": "dist/js/getstream.js", | ||
@@ -5,0 +5,0 @@ "ignore": [ |
@@ -77,4 +77,5 @@ var gulp = require('gulp'); | ||
})) | ||
.pipe(gulp.dest('./dist/js')) | ||
.pipe(uglify()) | ||
.pipe(gulp.dest('./dist/js')); | ||
.pipe(gulp.dest('./dist/js_min')); | ||
}); | ||
@@ -123,3 +124,3 @@ | ||
gulp.task('release', function () { | ||
runSynchronized(['bump', 'write_bower', 'build', 'tag']); | ||
runSynchronized(['bump', 'build', 'tag']); | ||
return; | ||
@@ -126,0 +127,0 @@ }); |
@@ -10,3 +10,3 @@ { | ||
"homepage": "https://getstream.io/", | ||
"version": "1.0.0", | ||
"version": "1.0.2", | ||
"config": { | ||
@@ -13,0 +13,0 @@ "blanket": { |
@@ -50,2 +50,9 @@ stream-js | ||
user1.addActivity(activity, callback); | ||
// Create a bit more complex activity | ||
activity = {'actor': 1, 'verb': 'run', 'object': 1, 'foreign_id': 'run:1', | ||
'course': {'name': 'Golden Gate park', 'distance': 10}, | ||
'participants': ['Thierry', 'Tommaso'], | ||
'started_at': new Date() | ||
}; | ||
user1.addActivity(activity, callback); | ||
@@ -64,2 +71,6 @@ // Remove an activity by its id | ||
// List followers, following | ||
user1.followers({limit: '10', offset: '10'}); | ||
user1.following({limit: '10', offset: '0'}); | ||
// all methods support callback as the last argument | ||
@@ -78,2 +89,8 @@ user1.follow('flat:42', callback); | ||
// specifying additional feeds to push the activity to using the to param | ||
// especially usefull for notification style feeds | ||
to = ['user:2', 'user:3'] | ||
activity = {'to': to, 'actor': 1, 'verb': 'tweet', 'object': 1, 'foreign_id': 'tweet:1'}; | ||
user1.addActivity(activity, callback); | ||
// creating a feed token server side | ||
@@ -80,0 +97,0 @@ token = user1.token; |
@@ -65,4 +65,6 @@ var errors = require('./errors'); | ||
follow: function(target, callbackOrToken, callback) { | ||
var targetToken = (callbackOrToken.call) ? null : callbackOrToken; | ||
var callback = (callbackOrToken.call) ? callbackOrToken : callback; | ||
if (callbackOrToken != undefined) { | ||
var targetToken = (callbackOrToken.call) ? null : callbackOrToken; | ||
var callback = (callbackOrToken.call) ? callbackOrToken : callback; | ||
} | ||
// if have a secret, always just generate and send along the token | ||
@@ -69,0 +71,0 @@ if (this.client.secret && !targetToken) { |
@@ -72,2 +72,15 @@ | ||
it('heroku real', function (done) { | ||
if (!node) { | ||
done(); | ||
} | ||
var url = 'https://bvt88g4kvc63:twc5ywfste5bm2ngqkzs7ukxk3pn96yweghjrxcmcrarnt3j4dqj3tucbhym5wfd@getstream.io/?site=669'; | ||
process.env.STREAM_URL = url; | ||
client = stream.connect(); | ||
expect(client.key).to.eql('bvt88g4kvc63'); | ||
expect(client.secret).to.eql('twc5ywfste5bm2ngqkzs7ukxk3pn96yweghjrxcmcrarnt3j4dqj3tucbhym5wfd'); | ||
expect(client.siteId).to.eql('669'); | ||
done(); | ||
}); | ||
it('heroku_overwrite', function (done) { | ||
@@ -232,2 +245,7 @@ if (!node) { | ||
it('follow without callback', function (done) { | ||
aggregated2.follow('user:111'); | ||
done(); | ||
}); | ||
it('unfollow', function (done) { | ||
@@ -234,0 +252,0 @@ var activityId = null; |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
Mixed license
License(Experimental) Package contains multiple licenses.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
410062
25
9878
148
1
26
3