Asana::getWebhooks PHP Method

getWebhooks() public method

Returns the compact representation of all webhooks your app has registered for the authenticated user in the given workspace.
public getWebhooks ( string $workspaceId, string $resource = null, array $opts = [] ) : string
$workspaceId string The workspace to query for webhooks in.
$resource string Optional: Only return webhooks for the given resource.
$opts array Array of options to pass (@see https://asana.com/developers/documentation/getting-started/input-output-options)
return string JSON or null
    public function getWebhooks($workspaceId, $resource = null, array $opts = array())
    {
        $opts = array_merge($opts, array('workspace' => $workspaceId));
        if (!is_null($resource)) {
            $opts['resource'] = $resource;
        }
        $options = http_build_query($opts);
        return $this->askAsana($this->webhooksUrl . '?' . $options);
    }