Lists Scheduled Reactions.
rpc ListScheduledReactions
ListScheduledReactions
webhook_api.v1.ListScheduledReactions
webhook_api.v1.ListScheduledReactions
Lists Scheduled Reactions.
requests ListScheduledReactionsRequest
ListScheduledReactionsRequest
webhook_api.v1.ListScheduledReactionsRequest
webhook_api.v1.ListScheduledReactionsRequest
resp, _ := webhookManagerService.ListScheduledReactions(ctx, &v1.ListScheduledReactionsRequest{
ApiKey: "API_KEY",
Filters: &common.Filter{
Operator: common.LogicalOperator_LOGICAL_OPERATOR_UNSPECIFIED,
Filters: []*common.FilterItem{
&common.FilterItem{
Field: "FIELD1",
Operator: common.FilterItem_FILTER_OPERATOR_UNSPECIFIED,
Value: &common.FilterItem_StrValue{
StrValue:"STRINGVAL",
},
},
&common.FilterItem{
Field: "FIELD2",
Operator: common.FilterItem_FILTER_OPERATOR_UNSPECIFIED,
Value: &common.FilterItem_IntValue{
IntValue:10,
},
},
&common.FilterItem{
Field: "FIELD3",
Operator: common.FilterItem_FILTER_OPERATOR_UNSPECIFIED,
Value: &common.FilterItem_BoolValue{
BoolValue:false,
},
},
},
},
Page: 0,
PageSize: 10000,
SortBy: &common.SortBy{
Items: []*common.SortItem{
&common.SortItem{
Direction: common.SortDirection_SORT_DIRECTION_UNSPECIFIED,
Field: "FIELD1",
},
&common.SortItem{
Direction: common.SortDirection_SORT_DIRECTION_UNSPECIFIED,
Field: "FIELD2",
},
},
},
})
fmt.Println(resp)
const filteritem = new FilterItem();
filteritem.setField("FIELD1");
filteritem.setOperator(FilterItem.FilterOperator.FILTER_OPERATOR_LTE);
filteritem.setStrValue("STRINGVAL");
const filteritem1 = new FilterItem();
filteritem1.setField("FIELD2");
filteritem1.setOperator(FilterItem.FilterOperator.FILTER_OPERATOR_LTE);
filteritem1.setIntValue(10);
const filteritem2 = new FilterItem();
filteritem2.setField("FIELD3");
filteritem2.setOperator(FilterItem.FilterOperator.FILTER_OPERATOR_GTE);
filteritem2.setBoolValue(false);
const filter = new Filter();
filter.setOperator(LogicalOperator.LOGICAL_OPERATOR_UNSPECIFIED);
filter.setFiltersList([filteritem, filteritem1, filteritem2]);
const sortitem = new SortItem();
sortitem.setDirection(SortDirection.SORT_DIRECTION_UNSPECIFIED);
sortitem.setField("FIELD1");
const sortitem1 = new SortItem();
sortitem1.setDirection(SortDirection.SORT_DIRECTION_ASCENDING);
sortitem1.setField("FIELD2");
const sortby = new SortBy();
sortby.setItemsList([sortitem, sortitem1]);
const listscheduledreactionsrequest = new ListScheduledReactionsRequest();
listscheduledreactionsrequest.setApiKey("API_KEY");
listscheduledreactionsrequest.setFilters(filter);
listscheduledreactionsrequest.setPage(0);
listscheduledreactionsrequest.setPageSize(10000);
listscheduledreactionsrequest.setSortBy(sortby);
service.listScheduledReactions(listscheduledreactionsrequest, (err, value:ListScheduledReactionsResponse|null) => {
const resp = JSON.stringify(err ? err : value);
console.log("received ", resp);
})
using System;
using Grpc.Core;
using Common;
using WebhookApi.V1;
namespace main
{
class Program
{
static void Main(string[] args)
{
Channel channel = new Channel("YOUR_WEBHOOK_URL:443", ChannelCredentials.Insecure);
var client = new WebhookManagerService.WebhookManagerServiceClient(channel);
var headers = new Metadata();
var filterItem = new FilterItem{
Field = "FIELD1",
Operator = FilterItem.Types.FilterOperator.Filter_operator_unspecified,
StrValue = "STRINGVAL",
};
var filterItem1 = new FilterItem{
Field = "FIELD2",
Operator = FilterItem.Types.FilterOperator.Filter_operator_unspecified,
IntValue = 10,
};
var filterItem2 = new FilterItem{
Field = "FIELD3",
Operator = FilterItem.Types.FilterOperator.Filter_operator_unspecified,
BoolValue = false,
};
var filter = new Filter{
Operator = LogicalOperator.Logical_operator_unspecified,
Filters = {filterItem, filterItem1, filterItem2},
};
var sortItem = new SortItem{
Direction = SortDirection.Sort_direction_unspecified,
Field = "FIELD1",
};
var sortItem1 = new SortItem{
Direction = SortDirection.Sort_direction_unspecified,
Field = "FIELD2",
};
var sortBy = new SortBy{
Items = {sortItem, sortItem1},
};
var listScheduledReactionsRequest = new ListScheduledReactionsRequest{
ApiKey = "API_KEY",
Filters = filter,
Page = 0,
PageSize = 10000,
SortBy = sortBy,
};
var reply = client.ListScheduledReactions(listScheduledReactionsRequest, headers);
Console.WriteLine("Response: " + reply);
channel.ShutdownAsync().Wait();
}
}
}
package demo;
import io.grpc.Channel;
import io.grpc.ManagedChannel;
import io.grpc.ManagedChannelBuilder;
import common.Common.Filter;
import common.Common.FilterItem;
import common.Common.LogicalOperator;
import common.Common.SortBy;
import common.Common.SortDirection;
import common.Common.SortItem;
import webhook_api.v1.Webhook.ListScheduledReactionsRequest;
import webhook_api.v1.Webhook.ListScheduledReactionsResponse;
import webhook_api.v1.WebhookManagerServiceGrpc;
public class App {
public static void main(String[] args) {
ManagedChannel channel = ManagedChannelBuilder
.forAddress("YOUR_WEBHOOK_URL", 443)
.usePlaintext()
.build();
WebhookManagerServiceGrpc.WebhookManagerServiceBlockingStub blockStub =
WebhookManagerServiceGrpc.newBlockingStub(channel);
FilterItem req_FilterItem =
FilterItem.newBuilder()
.setField("FIELD1")
.setOperator(FilterItem.FilterOperator.FILTER_OPERATOR_UNSPECIFIED)
.setStrValue("STRINGVAL")
.build();
FilterItem req_FilterItem2 =
FilterItem.newBuilder()
.setField("FIELD2")
.setOperator(FilterItem.FilterOperator.FILTER_OPERATOR_UNSPECIFIED)
.setIntValue(10)
.build();
FilterItem req_FilterItem3 =
FilterItem.newBuilder()
.setField("FIELD3")
.setOperator(FilterItem.FilterOperator.FILTER_OPERATOR_UNSPECIFIED)
.setBoolValue(false)
.build();
Filter req_Filter =
Filter.newBuilder()
.setOperator(LogicalOperator.LOGICAL_OPERATOR_UNSPECIFIED)
.addFilters(req_FilterItem)
.addFilters(req_FilterItem2)
.addFilters(req_FilterItem3)
.build();
SortItem req_SortItem =
SortItem.newBuilder()
.setDirection(SortDirection.SORT_DIRECTION_UNSPECIFIED)
.setField("FIELD1")
.build();
SortItem req_SortItem2 =
SortItem.newBuilder()
.setDirection(SortDirection.SORT_DIRECTION_UNSPECIFIED)
.setField("FIELD2")
.build();
SortBy req_SortBy =
SortBy.newBuilder()
.addItems(req_SortItem)
.addItems(req_SortItem2)
.build();
ListScheduledReactionsRequest req_ListScheduledReactionsRequest =
ListScheduledReactionsRequest.newBuilder()
.setApiKey("API_KEY")
.setFilters(req_Filter)
.setPage(0)
.setPageSize(10000)
.setSortBy(req_SortBy)
.build();
ListScheduledReactionsResponse resp = blockStub.listScheduledReactions(req_ListScheduledReactionsRequest);
System.out.println(resp);
channel.shutdown();
}
}
const filteritem = new FilterItem();
filteritem.setField("FIELD1");
filteritem.setOperator(FilterItem.FilterOperator.FILTER_OPERATOR_NOT_IN);
filteritem.setStrValue("STRINGVAL");
const filteritem1 = new FilterItem();
filteritem1.setField("FIELD2");
filteritem1.setOperator(FilterItem.FilterOperator.FILTER_OPERATOR_NOT_IN);
filteritem1.setIntValue(10);
const filteritem2 = new FilterItem();
filteritem2.setField("FIELD3");
filteritem2.setOperator(FilterItem.FilterOperator.FILTER_OPERATOR_GTE);
filteritem2.setBoolValue(false);
const filter = new Filter();
filter.setOperator(LogicalOperator.LOGICAL_OPERATOR_AND);
filter.setFiltersList([filteritem, filteritem1, filteritem2]);
const sortitem = new SortItem();
sortitem.setDirection(SortDirection.SORT_DIRECTION_UNSPECIFIED);
sortitem.setField("FIELD1");
const sortitem1 = new SortItem();
sortitem1.setDirection(SortDirection.SORT_DIRECTION_UNSPECIFIED);
sortitem1.setField("FIELD2");
const sortby = new SortBy();
sortby.setItemsList([sortitem, sortitem1]);
const listscheduledreactionsrequest = new ListScheduledReactionsRequest();
listscheduledreactionsrequest.setApiKey("API_KEY");
listscheduledreactionsrequest.setFilters(filter);
listscheduledreactionsrequest.setPage(0);
listscheduledreactionsrequest.setPageSize(10000);
listscheduledreactionsrequest.setSortBy(sortby);
service.listScheduledReactions(listscheduledreactionsrequest, (err, value) => {
const resp = JSON.stringify(err ? err : value);
console.log("received ", resp);
})
extern crate grpc-sdks;
use tonic::transport::Channel;
use grpc-sdks::webhook_api::v1::ListScheduledReactionsRequest;
use grpc-sdks::webhook_api::v1::webhook_manager_service_client::WebhookManagerServiceClient;
use grpc-sdks::common::filter_item::FilterOperator;
use grpc-sdks::common::FilterItem;
use grpc-sdks::common::SortBy;
use grpc-sdks::common::SortDirection;
use grpc-sdks::common::SortItem;
use grpc-sdks::common::Filter;
use grpc-sdks::common::LogicalOperator;
use grpc-sdks::common::filter_item;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let channel = Channel::from_static("YOUR_WEBHOOK_URL")
.connect()
.await?;
let mut client = WebhookManagerServiceClient::new(channel);
let request = tonic::Request::new(
ListScheduledReactionsRequest{
api_key: String::from("API_KEY"),
filters: Some(Filter{
filters: Vec::from([FilterItem{
field: String::from("FIELD1"),
operator: FilterOperator::FilterOperatorUnspecified as i32,
value: Some(filter_item::Value::StrValue(String::from("STRINGVAL")))
}, FilterItem{
field: String::from("FIELD2"),
operator: FilterOperator::FilterOperatorUnspecified as i32,
value: Some(filter_item::Value::IntValue(10))
}, FilterItem{
field: String::from("FIELD3"),
operator: FilterOperator::FilterOperatorUnspecified as i32,
value: Some(filter_item::Value::BoolValue(false))
}]),
operator: LogicalOperator::LogicalOperatorUnspecified as i32
}),
page: 0,
page_size: 10000,
sort_by: Some(SortBy{
items: Vec::from([SortItem{
direction: SortDirection::SortDirectionUnspecified as i32,
field: String::from("FIELD1")
}, SortItem{
direction: SortDirection::SortDirectionUnspecified as i32,
field: String::from("FIELD2")
}])
})
});
// sending request and waiting for response
let response = client.list_scheduled_reactions(request).await?.into_inner();
println!("RESPONSE={:?}", response);
Ok(())
}
package app
import io.grpc.ManagedChannelBuilder
import common.Common.Filter
import common.Common.FilterItem
import common.Common.LogicalOperator
import common.Common.SortBy
import common.Common.SortDirection
import common.Common.SortItem
import webhook_api.v1.Webhook.ListScheduledReactionsRequest
import webhook_api.v1.Webhook.ListScheduledReactionsResponse
import webhook_api.v1.WebhookManagerServiceGrpc
fun main() {
val channel = ManagedChannelBuilder
.forAddress("YOUR_WEBHOOK_URL", 443)
.usePlaintext()
.build()
var blockStub = WebhookManagerServiceGrpc.newBlockingStub(channel)
val req_FilterItem = FilterItem.newBuilder()
.setField("FIELD1")
.setOperator(FilterItem.FilterOperator.FILTER_OPERATOR_UNSPECIFIED)
.setStrValue("STRINGVAL")
.build()
val req_FilterItem2 = FilterItem.newBuilder()
.setField("FIELD2")
.setOperator(FilterItem.FilterOperator.FILTER_OPERATOR_UNSPECIFIED)
.setIntValue(10)
.build()
val req_FilterItem3 = FilterItem.newBuilder()
.setField("FIELD3")
.setOperator(FilterItem.FilterOperator.FILTER_OPERATOR_UNSPECIFIED)
.setBoolValue(false)
.build()
val req_Filter = Filter.newBuilder()
.setOperator(LogicalOperator.LOGICAL_OPERATOR_UNSPECIFIED)
.addFilters(req_FilterItem)
.addFilters(req_FilterItem2)
.addFilters(req_FilterItem3)
.build()
val req_SortItem = SortItem.newBuilder()
.setDirection(SortDirection.SORT_DIRECTION_UNSPECIFIED)
.setField("FIELD1")
.build()
val req_SortItem2 = SortItem.newBuilder()
.setDirection(SortDirection.SORT_DIRECTION_UNSPECIFIED)
.setField("FIELD2")
.build()
val req_SortBy = SortBy.newBuilder()
.addItems(req_SortItem)
.addItems(req_SortItem2)
.build()
val req_ListScheduledReactionsRequest = ListScheduledReactionsRequest.newBuilder()
.setApiKey("API_KEY")
.setFilters(req_Filter)
.setPage(0)
.setPageSize(10000)
.setSortBy(req_SortBy)
.build()
val resp = blockStub.listScheduledReactions(req_ListScheduledReactionsRequest)
println(resp)
channel.shutdown()
}
returns ListScheduledReactionsResponse
ListScheduledReactionsResponse
webhook_api.v1.ListScheduledReactionsResponse
webhook_api.v1.ListScheduledReactionsResponse
Field | Type | Description |
---|---|---|
scheduled_reactions | ScheduledReaction repeated | List of Scheduled Reactions. |
total_owned_scheduled_reactions | uint32 | Total Owned Scheduled Reactions. |
{
"scheduled_reactions": [
{
"id": "REACTION_ID1",
"name": "REACTION_NAME1",
"reaction_type": 1,
"cron_tab": "*****",
"reaction_payload": {
"create_contract_payload": {
"sender_wallet_id": "SENDER_WALLET_ID1",
"commitments": [
{
"sender": "zSenderPublicKey",
"recipient": "zRecipientPublicKey",
"amount": {
"currency_code": "USD",
"amount": 100,
"decimals": 2
}
},
{
"sender": "zSenderPublicKey2",
"recipient": "zRecipientPublicKey2",
"amount": {
"currency_code": "USD",
"amount": 500,
"decimals": 2
}
}
],
"conditions": [
{
"condition": {
"hash": {
"presenter": "PresenterPublicKey",
"hash": "13550350a8681c84"
}
}
},
{
"condition": {
"hash": {
"presenter": "PresenterPublicKey",
"hash": "13550350a8681c84"
}
}
}
],
"timeout_secs": 10000,
"memo": "MEMO"
}
}
},
{
"id": "REACTION_ID2",
"name": "REACTION_NAME2",
"reaction_type": 1,
"cron_tab": "*****",
"reaction_payload": {
"create_contract_payload": {
"sender_wallet_id": "SENDER_WALLET_ID2",
"commitments": [
{
"sender": "zSenderPublicKey",
"recipient": "zRecipientPublicKey",
"amount": {
"currency_code": "USD",
"amount": 100,
"decimals": 2
}
},
{
"sender": "zSenderPublicKey2",
"recipient": "zRecipientPublicKey2",
"amount": {
"currency_code": "USD",
"amount": 500,
"decimals": 2
}
}
],
"conditions": [
{
"condition": {
"hash": {
"presenter": "PresenterPublicKey",
"hash": "13550350a8681c84"
}
}
},
{
"condition": {
"hash": {
"presenter": "PresenterPublicKey",
"hash": "13550350a8681c84"
}
}
}
],
"timeout_secs": 10000,
"memo": "MEMO"
}
}
}
],
"total_owned_scheduled_reactions": 2
}