Skip to content

Latest commit

 

History

History
68 lines (47 loc) · 2.4 KB

README.md

File metadata and controls

68 lines (47 loc) · 2.4 KB

Embloy's PHP SDK for interacting with your Embloy integration.

Installation

You can install the Embloy PHP SDK via Composer. Run the following command in your terminal:

composer require embloy/embloy-php

Usage

To use the Embloy PHP SDK, you'll need to initialize an EmbloyClient object with your client token and session information. Here's an example of how to use it:

use Embloy\EmbloyClient;
use Embloy\EmbloySession;

// Create an instance of EmbloySession
$session = new EmbloySession('mode', 'job_slug', ['success_url' => 'optional_success_url', 'cancel_url' => 'optional_cancel_url']);

// Create an instance of EmbloyClient
$client = new EmbloyClient('your-client-token', $session);

try {
    // Make a request to generate the URL
    $url = $client->makeRequest();
    echo "Application URL: $url";
} catch (\Exception $e) {
    echo "Error: " . $e->getMessage();
}

Run Tests

To run the tests for the Embloy PHP SDK, you'll need PHPUnit installed. If you haven't already installed PHPUnit, you can do so via Composer. Run the following command:

composer require --dev phpunit/phpunit

Once PHPUnit is installed, you can run the tests with the following command:

vendor/bin/phpunit tests

Publish Package

To publish the Embloy PHP SDK package, ensure that your package meets the Composer's standards by validating it with the following command:

composer validate

© Carlo Bortolan, Jan Hummel

Carlo Bortolan  ·  GitHub @carlobortolan  ·  contact via bortolanoffice@embloy.com

Jan Hummel  ·  GitHub @github4touchdouble  ·  contact via hummeloffice@embloy.com