knockapi 0.4.10 → 0.4.11
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/Gemfile.lock +1 -1
- data/lib/knock/objects.rb +17 -0
- data/lib/knock/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: 0ddc00df3cb669fa52a54e7e26232a07667b7206b7ebe79b9df585ca23c4ddae
|
|
4
|
+
data.tar.gz: 9a96083148d5c5c822782643a8d3e8b86f7baf7ea9e2e38802b6a4c7ad1dcccb
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9759c24b6bb7b3625832e4eb820ab63522dac55c65a42c7e81dc196dd5ccaad2db1ab90013e25d109bc94692c52ee83b3826955bd2a26f21dcb1677f0cff64eb
|
|
7
|
+
data.tar.gz: 3c790e4b2cefbb69c5cb7c2b856ad651b0ffe525b4f48cc0b4807537998c643abef5bf74e73491b71df421f21184efd3e20777032a0465d1fefe3bf75ba88e02
|
data/Gemfile.lock
CHANGED
data/lib/knock/objects.rb
CHANGED
|
@@ -363,6 +363,23 @@ module Knock
|
|
|
363
363
|
execute_request(request: request)
|
|
364
364
|
end
|
|
365
365
|
|
|
366
|
+
# Creates a bulk operation to create subscriptions for a set recipients to
|
|
367
|
+
# a set of objects within the given collection.
|
|
368
|
+
#
|
|
369
|
+
# @param [String] collection The collection the objects are in.
|
|
370
|
+
# @param [Array<Hash>] subscriptions The set of subscriptions to create.
|
|
371
|
+
#
|
|
372
|
+
# @return [Hash] a BulkOperation
|
|
373
|
+
def bulk_add_subscriptions(collection:, subscriptions: [])
|
|
374
|
+
request = post_request(
|
|
375
|
+
auth: true,
|
|
376
|
+
path: "/v1/objects/#{collection}/bulk/subscriptions/add",
|
|
377
|
+
body: { subscriptions: subscriptions }
|
|
378
|
+
)
|
|
379
|
+
|
|
380
|
+
execute_request(request: request)
|
|
381
|
+
end
|
|
382
|
+
|
|
366
383
|
# Removes subscriptions for the recipients on the object
|
|
367
384
|
#
|
|
368
385
|
# @param [String] collection The collection the object is in
|
data/lib/knock/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: knockapi
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.4.
|
|
4
|
+
version: 0.4.11
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Knock Labs, Inc.
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2023-
|
|
11
|
+
date: 2023-09-11 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|