Skip to content
Shabab Haider Siddique edited this page May 25, 2021 · 1 revision

Client

class Client

Client object is used to establish connection to the Cardinity API. It is required for executing any method.

Methods

Name Return Type Description
create(array([consumerKey],[consumerSecret]), $logger = Client::LOG_NONE) public void Establish oAuth connection using the provided consumer key and secret
call(MethodInterface $method) public void Execute the provided method on current connection

Example

<?php

use Cardinity\Client;
use Cardinity\Exception;

$client = Client::create([
    'consumerKey' => 'YOUR_CONSUMER_KEY',
    'consumerSecret' => 'YOUR_CONSUMER_SECRET',
]);

Clone this wiki locally