linkshare / linkshare-api
API Wrapper for consuming LinkShare developer APIs.
Installs: 1 028
Dependents: 0
Suggesters: 0
Security: 0
Stars: 7
Watchers: 5
Forks: 5
Open Issues: 9
Requires
- php: >=5.6
- linkshare/oauth2-linkshare: ~1.0
- nesbot/carbon: ~1.21
Requires (Dev)
- fabpot/php-cs-fixer: ~1.11
- mockery/mockery: ~0.9
- phpunit/phpunit: ~5.2
- psy/psysh: ~0.7
- squizlabs/php_codesniffer: ~2.5
- 1.0.x-dev
- dev-master / 1.0.x-dev
- v1.0.9
- v1.0.8
- v1.0.7
- v1.0.6
- v1.0.5
- dev-dependabot/composer/fabpot/php-cs-fixer-approx-2.19
- dev-dependabot/add-v2-config-file
- dev-dependabot/composer/squizlabs/php_codesniffer-approx-3.6
- dev-dependabot/composer/mockery/mockery-approx-1.3
- dev-dependabot/composer/nesbot/carbon-approx-2.23
- dev-dependabot/composer/phpunit/phpunit-approx-6.2
- dev-dependabot/composer/linkshare/oauth2-linkshare-approx-2.0
This package is auto-updated.
Last update: 2024-11-05 03:39:06 UTC
README
API clients for consuming LinkShare developer APIs.
What is this?
This package provides clients for LinkShare's developer APIs.
Implementation is based on The PHP League's OAuth 2.0 client libraries.
Currently implemented APIs:
- Link Locator (partial implementation)
- Product Search
Usage
You can find examples of how to use the APIs under the examples folder.
Generally though, a new API client is created in the following fashion:
// Options contain the information required for // authenticating against the API endpoints. $options = [ // Required: The client ID as provided by the developer's portal // This will vary for each API. 'client_id' => $clientId, // Required: The client secret as provided by the developer's portal // This will vary for each API. 'client_secret' => $password, // Required: The access token as provided by the developer's portal // This will vary for each API. 'access_token' => $access_token, // Required: Your LinkShare Affiliate username 'username' => $username, // Required: Your LinkShare Affiliate password 'password' => $password, // Required: Your LinkShare Affiliate Site ID 'scope' => $scope, // Optional: The timeout (in seconds) before a request fails 'timeout' => $timeout, ]; // To create an API client, simply supply the required options as shown above $linkLocator = new LinkLocator($options); $productSearch = new ProductSearch($options);