shipdeo/api

A Shipdeo API package

Installs: 6

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/shipdeo/api

v1.0.2 2024-06-13 08:41 UTC

This package is auto-updated.

Last update: 2025-12-13 12:14:00 UTC


README

A Shipdeo API package.

1. Installation

You can install the package via composer:

composer require shipdeo/api

2. Configuration

Add the following environment variables to your .env file:

SHIPDEO_CLIENT_ID=your-client-id
SHIPDEO_CLIENT_SECRET=your-client-secret
SHIPDEO_PLATFORM=your-platform
SHIPDEO_AUTH_URL=https://auth-api-development.shipdeo.com/oauth2/connect/token

3. Usage

Authenticationg

use Shipdeo\Facades\Shipdeo;

$authService = app('shipdeo.auth');
$response = $authService->authenticate(
    config('shipdeo.auth.client_id'),
    config('shipdeo.auth.client_secret'),
    'your-username',
    'your-password',
    config('shipdeo.auth.platform')
);

echo $response['accessToken'];

Step 4: Autoload Dependencies

Make sure to update your composer.json to include the necessary dependencies:

"require": {
    "php": ">=7.4",
    "guzzlehttp/guzzle": "^7.0"
}

Run composer update to install the new dependencies.