AgentPushKit-Client

 view release on metacpan or  search on metacpan

docs/EventPage.md  view on Meta::CPAN


## Load the model package
```perl
use AgentPushKit::Client::Object::EventPage;
```

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**events** | [**ARRAY[EventSummary]**](EventSummary.md) |  | 
**next_cursor** | **string** |  | [optional] 

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


docs/EventsApi.md  view on Meta::CPAN

[UserOrAgent](../README.md#UserOrAgent)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **list_events**
> EventPage list_events(organization_id => $organization_id, service => $service, type => $type, search => $search, cursor => $cursor, limit => $limit)

List a paginated inbox

### Example
```perl
use Data::Dumper;
use AgentPushKit::Client::EventsApi;
my $api_instance = AgentPushKit::Client::EventsApi->new(

    # Configure bearer access token for authorization: UserOrAgent
    access_token => 'YOUR_BEARER_TOKEN',
    
);

my $organization_id = "organization_id_example"; # string | 
my $service = "service_example"; # string | 
my $type = "type_example"; # string | 
my $search = "search_example"; # string | 
my $cursor = "cursor_example"; # string | 
my $limit = 50; # int | 

eval {
    my $result = $api_instance->list_events(organization_id => $organization_id, service => $service, type => $type, search => $search, cursor => $cursor, limit => $limit);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling EventsApi->list_events: $@\n";
}
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **organization_id** | **string**|  | 
 **service** | **string**|  | [optional] 
 **type** | **string**|  | [optional] 
 **search** | **string**|  | [optional] 
 **cursor** | **string**|  | [optional] 
 **limit** | **int**|  | [optional] [default to 50]

### Return type

[**EventPage**](EventPage.md)

### Authorization

[UserOrAgent](../README.md#UserOrAgent)

docs/SearchEventsInput.md  view on Meta::CPAN


## Load the model package
```perl
use AgentPushKit::Client::Object::SearchEventsInput;
```

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**filter** | [**EventFilter**](EventFilter.md) |  | 
**cursor** | **string** |  | [optional] 
**limit** | **int** |  | [optional] [default to 50]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


lib/AgentPushKit/Client/EventsApi.pm  view on Meta::CPAN


#
# list_events
#
# List a paginated inbox
#
# @param string $organization_id  (required)
# @param string $service  (optional)
# @param string $type  (optional)
# @param string $search  (optional)
# @param string $cursor  (optional)
# @param int $limit  (optional, default to 50)
{
    my $params = {
    'organization_id' => {
        data_type => 'string',
        description => '',
        required => '1',
    },
    'service' => {
        data_type => 'string',

lib/AgentPushKit/Client/EventsApi.pm  view on Meta::CPAN

    'type' => {
        data_type => 'string',
        description => '',
        required => '0',
    },
    'search' => {
        data_type => 'string',
        description => '',
        required => '0',
    },
    'cursor' => {
        data_type => 'string',
        description => '',
        required => '0',
    },
    'limit' => {
        data_type => 'int',
        description => '',
        required => '0',
    },
    };

lib/AgentPushKit/Client/EventsApi.pm  view on Meta::CPAN

    if ( exists $args{'type'}) {
        $query_params->{'type'} = $self->{api_client}->to_query_value($args{'type'});
    }

    # query params
    if ( exists $args{'search'}) {
        $query_params->{'search'} = $self->{api_client}->to_query_value($args{'search'});
    }

    # query params
    if ( exists $args{'cursor'}) {
        $query_params->{'cursor'} = $self->{api_client}->to_query_value($args{'cursor'});
    }

    # query params
    if ( exists $args{'limit'}) {
        $query_params->{'limit'} = $self->{api_client}->to_query_value($args{'limit'});
    }

    # path params
    if ( exists $args{'organization_id'}) {
        my $_base_variable = "{" . "organizationId" . "}";

lib/AgentPushKit/Client/Object/EventPage.pm  view on Meta::CPAN

}                                 );

__PACKAGE__->method_documentation({
    'events' => {
        datatype => 'ARRAY[EventSummary]',
        base_name => 'events',
        description => '',
        format => '',
        read_only => '',
            },
    'next_cursor' => {
        datatype => 'string',
        base_name => 'nextCursor',
        description => '',
        format => '',
        read_only => '',
            },
});

__PACKAGE__->openapi_types( {
    'events' => 'ARRAY[EventSummary]',
    'next_cursor' => 'string'
} );

__PACKAGE__->attribute_map( {
    'events' => 'events',
    'next_cursor' => 'nextCursor'
} );

__PACKAGE__->mk_accessors(keys %{__PACKAGE__->attribute_map});


1;

lib/AgentPushKit/Client/Object/SearchEventsInput.pm  view on Meta::CPAN

}                                 );

__PACKAGE__->method_documentation({
    'filter' => {
        datatype => 'EventFilter',
        base_name => 'filter',
        description => '',
        format => '',
        read_only => '',
            },
    'cursor' => {
        datatype => 'string',
        base_name => 'cursor',
        description => '',
        format => '',
        read_only => '',
            },
    'limit' => {
        datatype => 'int',
        base_name => 'limit',
        description => '',
        format => '',
        read_only => '',
            },
});

__PACKAGE__->openapi_types( {
    'filter' => 'EventFilter',
    'cursor' => 'string',
    'limit' => 'int'
} );

__PACKAGE__->attribute_map( {
    'filter' => 'filter',
    'cursor' => 'cursor',
    'limit' => 'limit'
} );

__PACKAGE__->mk_accessors(keys %{__PACKAGE__->attribute_map});


1;

t/EventsApiTest.t  view on Meta::CPAN

#my $get_event_result = $api->get_event(organization_id => $get_event_organization_id, event_id => $get_event_event_id);

#
# list_events test
#
# uncomment below and update the test
#my $list_events_organization_id = undef; # replace NULL with a proper value
#my $list_events_service = undef; # replace NULL with a proper value
#my $list_events_type = undef; # replace NULL with a proper value
#my $list_events_search = undef; # replace NULL with a proper value
#my $list_events_cursor = undef; # replace NULL with a proper value
#my $list_events_limit = undef; # replace NULL with a proper value
#my $list_events_result = $api->list_events(organization_id => $list_events_organization_id, service => $list_events_service, type => $list_events_type, search => $list_events_search, cursor => $list_events_cursor, limit => $list_events_limit);

#
# list_notification_types test
#
# uncomment below and update the test
#my $list_notification_types_organization_id = undef; # replace NULL with a proper value
#my $list_notification_types_service_id = undef; # replace NULL with a proper value
#my $list_notification_types_result = $api->list_notification_types(organization_id => $list_notification_types_organization_id, service_id => $list_notification_types_service_id);

#



( run in 2.692 seconds using v1.01-cache-2.11-cpan-c221a9de4ec )