Download the PHP package bluepsyduck/factorio-mod-portal-client without Composer
On this page you can find all versions of the php package bluepsyduck/factorio-mod-portal-client. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download bluepsyduck/factorio-mod-portal-client
More information about bluepsyduck/factorio-mod-portal-client
Files in bluepsyduck/factorio-mod-portal-client
Package factorio-mod-portal-client
Short Description A client to access the Factorio mod portal.
License GPL-3.0-or-later
Homepage https://github.com/BluePsyduck/factorio-mod-portal-client
Informations about the package factorio-mod-portal-client
Factorio Mod Portal Client Library
This library implements a PHP client to access the API of the Factorio Mod Portal.
Usage
The client is shipped with a ConfigProvider
to directly integrate it into a Zend Expressive project. Using it in other
contexts will require additional configuration not covered by this README file.
To use the client in a Zend Expressive context, add the BluePsyduck\FactorioModPortalClient\ConfigProvider
to your
config aggregator, and fetch the actual client or the facade from the container.
Configuration
The client provides a zero-config setup. Yet, to use the full feature set, few values are required to be configured:
Example
There are basically two approaches to requesting data from the mod portal API: Using the facade for simple access, and using the client directly for the full set of features.
Using the facade is straight forward: Request the facade instance from the container, pass the requests in and get the responses back:
Using the client itself allows you to make parallel requests using the Promises returned by the client for the requests.
Additionally, both the facade and the client provide methods to transform download and asset paths to their full URL:
All versions of factorio-mod-portal-client with dependencies
ext-json Version *
guzzlehttp/guzzle Version ^6.3 | ^7.0
jms/serializer Version ^3.2
psr/container Version ^1.0
symfony/yaml Version ^4.2 | ^5.0 | ^6.0