hosted-solr / apiclient
PHP Api Client for hosted-solr.com
Installs: 40
Dependents: 1
Suggesters: 0
Security: 0
Stars: 3
Watchers: 15
Forks: 3
Open Issues: 0
Type:hosted-solr-php-api-client
Requires
- php: >=5.5.0
- guzzlehttp/guzzle: ^6.2.1
Requires (Dev)
- phpunit/phpunit: 4.1.3
- squizlabs/php_codesniffer: *
This package is not auto-updated.
Last update: 2023-02-04 09:29:58 UTC
README
With this php library you can list, created and delete solr cores on hosted-solr.com with your PHP Application.
The API-Client comes with some PHP Classes that are usefull to communicate with the api
HostedSolr\ApiClient\Domain\Api\Client\Solr\CoreRepository:
Used to create, retrieve and delete cores.
HostedSolr\ApiClient\Domain\Api\Client\Solr\Core:
The object representation of a core, you can use it to visualize all information that is retrieved by the api.
HostedSolr\ApiClient\Service:
Toplevel service object that can be used to do the most common tasks.
You can use all Classes of the ApiClient in your Application but it's recommended to use the service class only.
Example:
Install all composer dependencies:
curl -sS https://getcomposer.org/installer | php
php composer.php install
touch test.php
Explorer the api service an execute your operations (Add the following to your test.php file):
require_once 'vendor/autoload.php'; $service = \HostedSolr\ApiClient\Factory::getApiService('<your-api-token>','<your-secret-token>'); $allCores = $service->getAllCores();