smartlist_push_api 0.1.13 → 0.1.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +19 -2
- data/lib/smartlist_push_api.rb +1 -0
- data/lib/smartlist_push_api/custom.rb +9 -0
- data/lib/smartlist_push_api/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 900307f864a94662a451fc2d955f5d960e445e08
|
4
|
+
data.tar.gz: fb6d0bfb97741264d7546c0d5a370a3309cb10fb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b205a40358aaf65225a5c61c16ff9b017110d03a211db586d5622d094f6081905fd498864724edf515a07171b7eefcaaf64dc8007078992c34f045cbf8ed9912
|
7
|
+
data.tar.gz: 8d61e6fb250020ea3cb5eb65f56f5285796d015fce6d3f5877476f9c3b9a8d2d36bf09a7ffc4444b1bbef55d8e0138b2998f690c313bc66a49f34f599338629d
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Smartlist Push API
|
2
2
|
|
3
|
-
|
3
|
+
The Smartlist Push API allows you to send your user activity to Smartlist to drive analytics and automated messaging through the Smartlist application. The data that you send to Smartlist is used to set up filters that enable the creation of segments and targeting for automated messaging to users.
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
@@ -53,6 +53,8 @@ Once a user registers within your app, you can send that information to Smartlis
|
|
53
53
|
|
54
54
|
The field `ref_id` is required and should be unique for each user from your app. You will use that field to create or update a user’s information.
|
55
55
|
|
56
|
+
You can also use the above method to deliver your existing users data to Smartlist.
|
57
|
+
|
56
58
|
When a user changes their data, you can sync information with Smartlist with the following method:
|
57
59
|
|
58
60
|
```ruby
|
@@ -76,6 +78,7 @@ Every time user logs in in your app, you can update Smartlist (as a way to track
|
|
76
78
|
```
|
77
79
|
This method receive two attributes: user's `ref_id` and a `datetime` object.
|
78
80
|
|
81
|
+
You can also use the above method to deliver your existing users login activity to Smartlist.
|
79
82
|
|
80
83
|
#### Subscription Activity
|
81
84
|
|
@@ -96,7 +99,21 @@ If your app has subscription plans, you can send that to Smartlist to filter use
|
|
96
99
|
# ref_id, plan name that was canceled, datetime object when subscription was cancelled
|
97
100
|
SmartlistPushApi::User.canceled_subscription('ref_user_102', 'Pro', 2.days.ago)
|
98
101
|
```
|
102
|
+
You can also use the above method to deliver your existing users subscription status to Smartlist.
|
103
|
+
|
104
|
+
#### Custom Events
|
105
|
+
|
106
|
+
For all other events that you have inside your app, you can use following method to post them to Smartlist.
|
107
|
+
|
108
|
+
```rails
|
109
|
+
SmartlistPushApi::Custom.create('ref_user_102', {
|
110
|
+
event: 'rented-movie',
|
111
|
+
title: 'The Man Who Knew Infinity',
|
112
|
+
event_date: '2016-07-26 20:28:37',
|
113
|
+
payload: ['drama', 'biography']
|
114
|
+
})
|
115
|
+
```
|
99
116
|
|
100
117
|
## License
|
101
118
|
|
102
|
-
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
119
|
+
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
data/lib/smartlist_push_api.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: smartlist_push_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ivan Bajalovic
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-08-
|
11
|
+
date: 2016-08-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -98,6 +98,7 @@ files:
|
|
98
98
|
- bin/console
|
99
99
|
- bin/setup
|
100
100
|
- lib/smartlist_push_api.rb
|
101
|
+
- lib/smartlist_push_api/custom.rb
|
101
102
|
- lib/smartlist_push_api/http/http_client.rb
|
102
103
|
- lib/smartlist_push_api/user.rb
|
103
104
|
- lib/smartlist_push_api/version.rb
|