staatic / staatic-api-php
Staatic API client library for PHP. Staatic lets you create and deploy a streamlined static version of your WordPress site, enhancing performance, SEO, and security simultaneously.
1.0.2
2024-05-23 07:50 UTC
Requires
- php: ^7.4 || ^8.0
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- guzzlehttp/guzzle: ^7.8
- guzzlehttp/psr7: ^1.7 || ^2.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.26
README
This is the Staatic API. You can find out more about Staatic at https://staatic.com.
For more information, please visit https://staatic.com/support.
Installation & Usage
Requirements
PHP 7.4 and later. Should also work with PHP 8.0+.
Composer
To install the bindings via Composer, run:
composer require staatic/staatic-api-php
Getting Started
Please follow the installation procedure and then run the following:
<?php require_once(__DIR__ . '/vendor/autoload.php'); // Configure OAuth2 access token for authorization: oauth_site $config = Staatic\Api\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); // Configure OAuth2 access token for authorization: oauth_user $config = Staatic\Api\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); $apiInstance = new Staatic\Api\Api\AccountApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), $config ); $create_site_request = new \Staatic\Api\Model\CreateSiteRequest(); // \Staatic\Api\Model\CreateSiteRequest | Site to be created try { $result = $apiInstance->createSite($create_site_request); print_r($result); } catch (Exception $e) { echo 'Exception when calling AccountApi->createSite: ', $e->getMessage(), PHP_EOL; }
API Endpoints
All URIs are relative to https://api.staatic.com
Models
- CreateDeploymentRequest
- CreateFormNotificationRequest
- CreateFormRequest
- CreateFormSubmissionRequest
- CreateFormTemplateRequest
- CreateSearchIndexRequest
- CreateSiteRequest
- DeleteSearchRecordsRequest
- Deployment
- DeploymentCollection
- DeploymentFile
- DeploymentFileCollection
- Error
- Form
- FormCollection
- FormNotification
- FormNotificationCollection
- FormSubmission
- FormSubmissionCollection
- FormTemplate
- FormTemplateCollection
- ImportSearchRecordsRequest
- Links
- Meta
- Plugin
- PluginCollection
- PluginLastVersion
- SearchIndex
- SearchIndexCollection
- SearchItem
- SearchRequest
- Site
- SiteCollection
- Subscription
- SubscriptionCollection
- UnprocessableError
- UpdateDeploymentRequest
- UpdateFormNotificationRequest
- UpdateFormRequest
- UpdateFormSubmissionRequest
- UpdateFormTemplateRequest
- UpdateSearchIndexRequest
- UpdateSiteRequest
Authorization
Authentication schemes defined for the API:
oauth_site
- Type:
OAuth
- Flow:
application
- Authorization URL: ``
- Scopes: N/A
oauth_user
- Type:
OAuth
- Flow:
password
- Authorization URL: ``
- Scopes:
- manage-deployments: Manage deployments
- manage-forms: Manage forms
- manage-sites: Manage sites
- manage-search: Manage search
public_api_key
- Type: API key
- API key parameter name: X-Staatic-API-Key
- Location: HTTP header
About this package
This PHP package is automatically generated by the OpenAPI Generator project:
- API version:
1.0.2
- Package version:
1.0.2
- Package version:
- Build package:
org.openapitools.codegen.languages.PhpClientCodegen