handelsgids / sharedcount
This package is abandoned and no longer maintained.
No replacement package was suggested.
PHP wrapper for the Sharedcount.com API.
v1.1.2
2021-09-01 11:46 UTC
Requires
- php: >=5.6
- ext-json: *
- guzzlehttp/guzzle: ^7.3
Requires (Dev)
- phpstan/phpstan: ^0.12.3
- phpunit/phpunit: ^5.0
This package is auto-updated.
Last update: 2022-01-18 15:52:45 UTC
README
Introduction
PHP wrapper for the Sharedcount.com API.
Installation
composer require handelsgids/sharedcount
Example
<?php require 'vendor/autoload.php'; use Handelsgids\Sharedcount\Sharedcount; $sharedcount = new Sharedcount('yourapikeygoeshere'); $facebookShares = $sharedcount ->getByUrl('https://www.handelsgids.be') ->getFacebook() ->getShareCount() ;
The above example will output:
5008
Configuration
Make sure to define whether or not you have a free or paid subscription.
The default is free. Use the following line to set a paying subscription.
$sharedcount = new Sharedcount('yourapikeygoeshere', Sharedcount::SUBSCRIPTION_PAYING);
Running tests
Set your Sharedcount API key in phpunit.xml and run composer test
.
License
Handelsgids Sharedcount PHP Wrapper is open-sourced software licensed under the MIT license.