Skip to content

GsiorX/stadar-php

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

stadar/sdk — PHP SDK for the esports-api

Auto-generated from the OpenAPI 3.1 spec via openapi-generator. PHP 8.1+.

Install

composer require stadar/sdk

Use

use Stadar\Sdk\Api\GamesApi;
use Stadar\Sdk\Extra\FromEnv;

$config = FromEnv::configuration();   // reads STADAR_API_KEY
$games = new GamesApi(null, $config);
$list = $games->listGames();

Webhook signature verification

use Stadar\Sdk\Extra\Webhooks;

$body = file_get_contents('php://input');
if (!Webhooks::verify($body, $_SERVER['HTTP_X_STADAR_SIGNATURE'] ?? '', getenv('STADAR_WEBHOOK_SECRET') ?: '')) {
    http_response_code(401);
    exit;
}

Publishing

Packagist auto-syncs from the GitHub repo on every release. No CI step required after first registration.

Regenerating

scripts/generate-sdks.sh

About

PHP SDK for the stadar.net esports data API — auto-mirrored from upstream on every sdk-php-v* tag.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages