Creating your Project
In general, even though every API client extension will provide different functionality, they should all look very similar.
To that end, we provide a template to get you started creating an API client extension. To get started simply run:
composer create-project bristol-su/example-api-client my-module-api-client
Replace my-module with the name of your module.
Make the template your own
composer.json
In the composer.json file, you will need to make the following changes
-
Come up with a name for your client. For example, 'my-name/my-module-api-client'. This is the name people will use to pull your client into their projects.
-
Change the description to represent your client
-
Change the 'authors' section to represent your details.
-
Change the namespaces in both 'autoload' and 'autoload-dev'. We recommend changing 'YourNamespace' to your name, so it is unique to you, and 'Module' to your module alias.
Having done this, run composer update to make your changes.