Download the PHP package ashampoo/ats-client without Composer
On this page you can find all versions of the php package ashampoo/ats-client. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download ashampoo/ats-client
More information about ashampoo/ats-client
Files in ashampoo/ats-client
Package ats-client
Short Description Laravel client for the Ashampoo Translation Studio API
License proprietary
Informations about the package ats-client
Ashampoo ATS Client
Laravel client for the Ashampoo Translation Studio (ATS) API.
Wraps the ATS HTTP endpoints in a typed, testable client with declarative endpoint definitions, query-parameter validation, and wrapped exceptions.
- PHP:
^8.3 - Laravel:
^12.0 || ^13.0
Installation
The package is auto-discovered once it's in the packages/ tree and declared
in the root composer.json repositories/require sections:
Publish the config (optional — the package ships with sensible defaults):
Configuration
Set in .env:
ATS_BASEURL, ATS_TOKEN, and ATS_PROJECT_ID are required when resolving
the client from the container; the service provider throws
InvalidArgumentException early with a clear message if one is missing.
ATS_TIMEOUT is optional and defaults to 30 seconds.
Usage
The public API consists of typed methods, one per endpoint. Each method
returns Laravel's Illuminate\Http\Client\Response.
Via dependency injection
Via facade
GET — fetching translations
POST — JSON import
Machine translation / Translation memory
Endpoints
Defined in AtsEndpoint:
| Case | Method | Path |
|---|---|---|
Translations |
GET | /api/project/{projectId}/translations |
TranslationsAll |
GET | /api/project/{projectId}/translations/all |
LangInfo |
GET | /api/project/{projectId}/language/info |
TranslationImport |
POST | /api/project/{projectId}/import |
MachineTranslation |
POST | /api/machinetranslations/{projectId}/generate |
MachineTranslationAll |
POST | /api/machinetranslations/{projectId}/generate/all |
MemoryTranslation |
POST | /api/translationmemory/{projectId}/generate |
MemoryTranslationAll |
POST | /api/translationmemory/{projectId}/generate/all |
Each case also declares its allowed query parameters via
AtsEndpoint::queryParams(). Required parameters are enforced by the client
before any HTTP call is made.
Exceptions
All exceptions extend the abstract AtsException
and live in Ashampoo\AtsClient\Exceptions\:
| Exception | When |
|---|---|
MissingQueryParamException |
Required query parameter not provided before the HTTP call. |
MissingBodyException |
Endpoint requires a JSON body but none was supplied. |
UnresolvedPathPlaceholderException |
A {placeholder} in the endpoint path was never substituted. |
AtsRequestException |
Server returned 4xx/5xx. getResponse(): Response exposes it. |
Typical handling:
Development
Tests use Http::fake() throughout — no network calls.
License
Proprietary. See LICENSE.
All versions of ats-client with dependencies
ext-json Version *
ext-zip Version *
illuminate/http Version ^12.0 || ^13.0
illuminate/support Version ^12.0 || ^13.0