Download the PHP package freespoke/partner without Composer

On this page you can find all versions of the php package freespoke/partner. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package partner

Freespoke Partner API PHP Client

A lightweight PHP client for the Freespoke Partner API REST gateway.

Requirements

Installation

If installing from GitHub, add a VCS repository entry and require it:

Quickstart

Client construction

API key (static token)

Use the static helper:

Or inject your own Guzzle instance (for custom timeouts, retries, proxies, etc):

OAuth2 client credentials

For service accounts, use createWithClientCredentials(). The client will exchange the client ID and secret for an access token automatically and refresh it when it expires.

Both tokenURL and baseURL can be overridden if needed (e.g. for testing or local development).

Authentication

Both authentication modes produce the same HTTP header on every request:

With Client::create(), you provide the token directly. With Client::createWithClientCredentials(), the token is obtained (and refreshed) from the OAuth2 token endpoint automatically.

Data model

Article

Required fields:

Optional fields:

Person

Optional fields:

API methods

Index content

Submit an article to Freespoke for indexing. The API responds with a job token you can poll for completion.

Returns IndexResult with job_id and workflow_id when successful. Returns null if the API responds with errorMessage/error_message or if required fields are missing in the response body.

Check indexing status

Poll the status of a previously submitted indexing job.

Returns IndexStatusResult or null if the response body does not include a job object. The status field maps to the Partner API job status values (JOB_STATUS_PENDING, JOB_STATUS_COMPLETE, JOB_STATUS_FAILED).

Epoch

Check whether the indexing requirements have changed so you can decide when to re-submit content.

Returns the API epoch as an int. If the response body is missing the field, the client returns 0.

An epoch is a unix timestamp. If the most recent moment at which a URL was published to the Freespoke API is before the epoch value, the URL should be resubmitted.

Error handling

The client does not swallow HTTP or network errors. Guzzle will throw a RequestException for non-2xx responses and transport failures. Wrap calls in try/catch if you want to handle these explicitly.

Further Reading

Visit the Integration Guide for more information.

Testing

License

MIT


All versions of partner with dependencies

PHP Build Version
Package Version
Requires php Version >=8
guzzlehttp/guzzle Version ^7.10
league/oauth2-client Version ^2.7
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package freespoke/partner contains the following files

Loading the files please wait ...