Download the PHP package hdinnovations/laravel-polar-api without Composer
On this page you can find all versions of the php package hdinnovations/laravel-polar-api. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download hdinnovations/laravel-polar-api
More information about hdinnovations/laravel-polar-api
Files in hdinnovations/laravel-polar-api
Package laravel-polar-api
Short Description An API wrapper for the POLAR API.
License MIT
Homepage https://github.com/hdinnovations/laravel-polar-api
Informations about the package laravel-polar-api
Laravel Polar API
Laravel Polar API is a Laravel package that provides an API wrapper for polar.sh API. This package simplifies the process of interacting with the Polar API by providing a set of convenient methods and classes.
Installation
To install the package, you can use Composer:
Configuration
After installing the package, you need to publish the configuration file:
This command will publish a polar-api.php
file in your config
directory. You can use this file to configure the package.
The configuration file contains the following options:
base_url
: The base URL of the POLAR API.token
: The token (PAT) used to authenticate requests to the POLAR API.
You can also set the POLAR_API_BASE_URL
and POLAR_API_TOKEN
environment variables in your .env
file which is recommended.
Usage Documentation
Please refer to our documentation for detailed information on how to use this package and the endpoints + parameters it supports.
Exceptions
The package throws the following exceptions:
HDInnovations\LaravelPolarApi\Exceptions\PolarApiNotFoundException
: Thrown when the requested resource is not found.HDInnovations\LaravelPolarApi\Exceptions\PolarApiUnprocessableEntityException
: Thrown when the request is invalid.HDInnovations\LaravelPolarApi\Exceptions\PolarApiValidationException
: Thrown when the request validation fails.HDInnovations\LaravelPolarApi\Exceptions\PolarApiUnauthorizedException
: Thrown when the request is unauthorized.
Testing
To run the tests, use the following command:
Test Coverage
To generate the test coverage, use the following command:
Static Analysis
To run static analysis, use the following command:
Type Coverage
To check the type coverage, use the following command:
License
The package is open-source software licensed under the MIT license.
Roadmap
- [ ] Support all GET requests
- [ ] Support all POST requests
- [ ] Support all PUT requests
- [ ] Support all DELETE requests
- [x] Add more exception handling
- [x] Add more examples
- [x] 100% test coverage
- [x] 100% type coverage