handelsgids / sharedcount
PHP wrapper for the Sharedcount.com API.
Installs: 26
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 0
Open Issues: 0
pkg:composer/handelsgids/sharedcount
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.