Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,14 +161,17 @@ var setTagsOptions = {
tags: {
price: "1.99",
language: "pl"
}
},
userId: 'user123' // required for user-specific tags
};

// this will set the device tags for the client's 'AppCode' application
client.setTags(setTagsOptions , function(error, response) {
...
});
```

Note: `userId` is a required field when a user-specific tag(s) is being set.

#### Get tags for device
To get tags for a device from Pushwoosh:
Expand Down
4 changes: 4 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,10 @@ PushwooshClient.prototype.setTags = function(options, callback) {
}
};

if (options.userId) {
body.request.userId = options.userId;
}

client.sendRequest('setTags', body, function(error, response, body){
if (error) {
return callback(error);
Expand Down
Loading