Skip to content

Latest commit

 

History

History
71 lines (52 loc) · 2.8 KB

README.md

File metadata and controls

71 lines (52 loc) · 2.8 KB

Events

(events)

Overview

Available Operations

  • list - Retrieve a list of events

list

Retrieve a paginated list of events for the authenticated workspace.

Example Usage

declare(strict_types=1);

require 'vendor/autoload.php';

use Dub;
use Dub\Models\Operations;

$sdk = Dub\Dub::builder()
    ->setSecurity(
        'DUB_API_KEY'
    )
    ->build();

$request = new Operations\ListEventsRequest(
    city: 'New York',
    device: 'Desktop',
    browser: 'Chrome',
    os: 'Windows',
    referer: 'google.com',
    refererUrl: 'https://dub.co/blog',
);

$response = $sdk->events->list(
    request: $request
);

if ($response->oneOf !== null) {
    // handle response
}

Parameters

Parameter Type Required Description
$request Operations\ListEventsRequest ✔️ The request object to use for the request.

Response

?Operations\ListEventsResponse

Errors

Error Type Status Code Content Type
Errors\BadRequest 400 application/json
Errors\Unauthorized 401 application/json
Errors\Forbidden 403 application/json
Errors\NotFound 404 application/json
Errors\Conflict 409 application/json
Errors\InviteExpired 410 application/json
Errors\UnprocessableEntity 422 application/json
Errors\RateLimitExceeded 429 application/json
Errors\InternalServerError 500 application/json
Errors\SDKException 4XX, 5XX */*