GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — php-api-sdk/README.md at main · programmatordev/php-api-sdk

Expand file tree

/

README.md

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
52 lines (36 loc) · 3.11 KB
/

README.md

Copy path

File metadata and controls

52 lines (36 loc) · 3.11 KB
Raw
Copy raw file
Download raw file
Outline
Edit and raw actions

PHP API SDK

Latest Version Software License Tests

These docs describe how to create API SDKs with this package.

This package is built for two developer audiences:

  • SDK authors: developers creating concrete API SDKs with this library.
  • SDK users: developers consuming those SDKs in applications.

The goal is to keep SDK authoring fluent and compact, keep SDK usage focused on real API resources, and still expose enough control for developers who need to customize or work around an SDK.

The practical guides below show how to build resources, map responses, and configure the HTTP pipeline. Read Design Approach for more about the reasoning behind the API shape.

Requirements

  • PHP >=8.1
  • PSR-18 HTTP client support
  • PSR-17 request and stream factory support

The package uses PHP-HTTP discovery for PSR-18 clients and PSR-17 factories. When the php-http/discovery Composer plugin is enabled, missing implementations can be installed automatically from the supported virtual packages.

Installation

composer require programmatordev/php-api-sdk

SDK packages may still require or suggest concrete PSR-18 and PSR-17 implementations when they want tighter control over the default HTTP stack.

Guides

  • Getting Started: create a small SDK with an API facade, resource, entity, and response mapping.
  • Design Approach: the reasoning behind fluent SDK authoring, clean SDK usage, and hackability.
  • API: SDK facade setup methods, configuration, and extension points.
  • Resource Authoring: deeper guide for resource methods, query/header options, request bodies, entity mapping, collections, envelopes, and API-specific resource chains.
  • Resources: resource classes and endpoint request helpers.
  • Responses: decoded data, raw responses, entities, collections, envelopes, and context.
  • Resolver: follow linked entities, collections, and pagination through the configured SDK runtime.
  • Authentication: configure bearer, basic, header, query, HTTPlug, and custom authentication.
  • HTTP Client: configure PSR-18 clients and PSR-17 factories.
  • Cache: configure PSR-6 HTTP response caching.
  • Logging: configure PSR-3 logging and HTTP/cache log output.
  • Plugins: configure HTTPlug middleware and priority ordering.
  • Hooks: run SDK-author callbacks around requests and responses.

Upgrading

See Upgrade to 3.0 for the high-level changes.

You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.