...
Subscriptions Functions
Function | Use |
---|---|
subscriptions | List a set of subscriptions depending on what parameters are past. |
subscriptionAttributes | Lists a subscriptions attributes |
checkSubscriptionName | Checks if a subscriptions name exists |
All subscriptions functions return an object with a status and an return object except for checkSubscriptionName. Documentation will reference the return object only.
Subscriptions Actions
Event Domain | Event Type | Actions | Use |
---|---|---|---|
wrangler | subscription | creates outbound pending subscription and sends pending_subscription event to external pico | Creates a new outbound pending subscription |
wrangler | pending_subscription | creates inbound pending subscription | Creates a new inbound pending subscription |
wrangler | pending_subscription_approval | sends pending_subscription_approved event with inbound_eci and outbound status to external pico and raises pending_subscription_approved with inbound status | Aprove inbound pending subscription |
wrangler | pending_subscription_approved | updates subscription status and outbound_eci if needed | Internally for adding aproved subscriptions |
wrangler | subscription_cancellation | inbound_subscription_rejection | outbound_subscription_cancellation | sends subscription_removal event with eci and status and raise the same event to self | alert external pico to remove subscriptions and alert self to remove subscription |
wrangler | subscription_removal | deletes channel used for subscription | internally for removing channel used for subscription |
subscriptions
returns an array of subscriptions collections keyed to subscriptions. Each subscriptions is owned by the pico which calls this function.
Parameter | Datatype | Required |
---|---|---|
<id> | <string> |
|
<collection> | <string> | |
<filtered> | <string> |
- <id> = <subscription channel_name> | <subscriptions channel_eci> | <subscriptions_name>
- <collection> = <name_space> | <relationship> | <status> | <channel_name> | <inbound_eci> | <outbound_eci> | <subscriber_role> | <my_role> | <subscriber_eci>(might break things) |<attributes>
- <filtered> = <desired value of collection>
On success
key | value |
---|---|
subscriptions | [{ <name_space:channel_name>: {"name_space":<string>, "relationship":<string>, "status":<string>, "channel_name":<string>, "inbound_eci":<string>, "subscriber_role":<string>, "my_role":<string>, "subscriber_eci":<string>, "attributes":<string>, "subscription_name":<string> }, },..{}n ] |
uses example
( null , null , null ){ "subscriptions" }; // all subscriptions response = v1_wrangler:subscriptions( "flipper" , null , null ){ "subscriptions" }; // single "flipper" subscriptions response = v1_wrangler:subscriptions( null ,"status " , null ){ "subscriptions" };
response = v1_wrangler:subscriptions( null , "status" , "inbound" ){ "subscriptions" }; // collection of subscriptions with "inbound" as status
|