activitysmith 0.1.4 → 0.1.5
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 +47 -25
- data/lib/activitysmith/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0d8716c7c9794439454c8ed5a182522c0a0eb32449d198dadea37652609f4469
|
|
4
|
+
data.tar.gz: 6b84b2f13f5930404ea1fdf8fa8adc73082aa9b3b6d2564dd119819e5f0c0c3d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: cad0ad010c8285ef38626df955773b4988a307736e95f399473a2d516ff39ecfce39849e81817a5e5ebfcd5150b668fbd3489869a6dbec7ffb5ae34190c1b5ea
|
|
7
|
+
data.tar.gz: 0d502d03eb228e205234bec172022c65e87ba6375072152baef435eed94091a05382d7c0eb479315214685ebb6d768c64ce843dfe8194f33fcf7ec7f9164a288
|
data/README.md
CHANGED
|
@@ -32,26 +32,7 @@ activitysmith = ActivitySmith::Client.new(api_key: ENV.fetch("ACTIVITYSMITH_API_
|
|
|
32
32
|
response = activitysmith.notifications.send(
|
|
33
33
|
{
|
|
34
34
|
title: "New subscription 💸",
|
|
35
|
-
message: "Customer upgraded to Pro plan"
|
|
36
|
-
redirection: "https://crm.example.com/customers/cus_9f3a1d", # Optional
|
|
37
|
-
actions: [ # Optional (max 4)
|
|
38
|
-
{
|
|
39
|
-
title: "Open CRM Profile",
|
|
40
|
-
type: "open_url",
|
|
41
|
-
url: "https://crm.example.com/customers/cus_9f3a1d"
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
title: "Start Onboarding Workflow",
|
|
45
|
-
type: "webhook",
|
|
46
|
-
url: "https://hooks.example.com/activitysmith/onboarding/start",
|
|
47
|
-
method: "POST",
|
|
48
|
-
body: {
|
|
49
|
-
customer_id: "cus_9f3a1d",
|
|
50
|
-
plan: "pro"
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
],
|
|
54
|
-
channels: ["sales", "customer-success"] # Optional
|
|
35
|
+
message: "Customer upgraded to Pro plan"
|
|
55
36
|
}
|
|
56
37
|
)
|
|
57
38
|
|
|
@@ -126,6 +107,52 @@ finish = activitysmith.live_activities.end(
|
|
|
126
107
|
puts finish.success
|
|
127
108
|
```
|
|
128
109
|
|
|
110
|
+
## Channels
|
|
111
|
+
|
|
112
|
+
Channels are used to target specific team members or devices. Can be used for both push notifications and live activities.
|
|
113
|
+
|
|
114
|
+
```ruby
|
|
115
|
+
response = activitysmith.notifications.send(
|
|
116
|
+
{
|
|
117
|
+
title: "New subscription 💸",
|
|
118
|
+
message: "Customer upgraded to Pro plan",
|
|
119
|
+
channels: ["sales", "customer-success"] # Optional
|
|
120
|
+
}
|
|
121
|
+
)
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
## Push Notification Redirection and Actions
|
|
125
|
+
|
|
126
|
+
Push notification redirection and actions are optional and can be used to redirect the user to a specific URL when they tap the notification or to trigger a specific action when they long-press the notification.
|
|
127
|
+
Webhooks are executed by ActivitySmith backend.
|
|
128
|
+
|
|
129
|
+
```ruby
|
|
130
|
+
response = activitysmith.notifications.send(
|
|
131
|
+
{
|
|
132
|
+
title: "New subscription 💸",
|
|
133
|
+
message: "Customer upgraded to Pro plan",
|
|
134
|
+
redirection: "https://crm.example.com/customers/cus_9f3a1d", # Optional
|
|
135
|
+
actions: [ # Optional (max 4)
|
|
136
|
+
{
|
|
137
|
+
title: "Open CRM Profile",
|
|
138
|
+
type: "open_url",
|
|
139
|
+
url: "https://crm.example.com/customers/cus_9f3a1d"
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
title: "Start Onboarding Workflow",
|
|
143
|
+
type: "webhook",
|
|
144
|
+
url: "https://hooks.example.com/activitysmith/onboarding/start",
|
|
145
|
+
method: "POST",
|
|
146
|
+
body: {
|
|
147
|
+
customer_id: "cus_9f3a1d",
|
|
148
|
+
plan: "pro"
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
]
|
|
152
|
+
}
|
|
153
|
+
)
|
|
154
|
+
```
|
|
155
|
+
|
|
129
156
|
## Error Handling
|
|
130
157
|
|
|
131
158
|
```ruby
|
|
@@ -138,11 +165,6 @@ rescue OpenapiClient::ApiError => err
|
|
|
138
165
|
end
|
|
139
166
|
```
|
|
140
167
|
|
|
141
|
-
## API Surface
|
|
142
|
-
|
|
143
|
-
- `activitysmith.notifications`
|
|
144
|
-
- `activitysmith.live_activities`
|
|
145
|
-
|
|
146
168
|
## Requirements
|
|
147
169
|
|
|
148
170
|
- Ruby 3.0+
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: activitysmith
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- ActivitySmith
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-02-
|
|
11
|
+
date: 2026-02-26 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: json
|