1. Go to this page and download the library: Download digitonic/dealmaker-api library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
digitonic / dealmaker-api example snippets
return [
/**
* The Client ID displayed when you created the OAuth application in the portal
* This is typically called the "Public Key" in the portal
*/
'client_id' => env('DEALMAKER_CLIENT_ID', ''),
/**
* The Client Secret displayed when you created the OAuth application in the portal
* This is typically called the "Secret Key" in the portal
*/
'client_secret' => env('DEALMAKER_CLIENT_SECRET', ''),
/**
* The scope is established when you created the OAuth application
* This is typically called the "Scopes" in the portal
*/
'scopes' => env('DEALMAKER_SCOPES', ''),
/**
* The DealMaker Deal ID for the current investment landing page
*/
'deal_id' => env('DEALMAKER_DEAL_ID', ''),
];
$auth = new DealMakerApiAuth();
$token = $auth->getAccessToken();
$dealmakerApi = new Digitonic\DealmakerApi\DealmakerApi($token);
$deals = new Digitonic\DealmakerApi\Requests\Deal\ListDeals();
$response = $dealmakerApi->send($deals);