Download the PHP package concretecms-community-store/community_store_api_client without Composer
On this page you can find all versions of the php package concretecms-community-store/community_store_api_client. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download concretecms-community-store/community_store_api_client
More information about concretecms-community-store/community_store_api_client
Files in concretecms-community-store/community_store_api_client
Package community_store_api_client
Short Description A client for Community Store API
License MIT
Homepage https://github.com/concretecms-community-store/community_store_api_client
Informations about the package community_store_api_client
Community Store API Client
This project contains a library that makes it easy to use the Community Store API.
You can use it in concrete5 v8 and in ConcreteCMS v9+ projects, as well as in custom (non concrete) projects.
Installation
With Composer
Simply add the concretecms-community-store/community_store_api_client
dependency:
Without Composer
Download this repository somewhere and include the register.php
file.
For example, if your local copy of this project is available at /path/to/community_store_api_client
, add this line in your PHP files:
Usage
Creating the Client instance
You need the base URL of your website, as well as the client ID and client secret.
You also need to tell the client the scopes you need:
In a concrete5/ConcreteCMS environment
Not in a concrete5/ConcreteCMS environment
In this case, you need the Guzzle HTTP Client library:
Retrieving the Community Store configuration
Sample output:
Retrieving the defined fulfilment satuses
Sample output:
Retrieving an order given its ID
Sample output:
Listing orders
Look for orders placed in the last 7 days, which are updaid and are awaiting processing:
Sample output:
Updating an order
Update the order with ID 5:
Sample output:
Product related operations
Still to be implemented.