fw4 / sweepbright-api
PHP library for implementing the SweepBright API
Installs: 2 144
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 3
Forks: 2
Open Issues: 1
pkg:composer/fw4/sweepbright-api
Requires
- php: ^7.1|^8.0
- guzzlehttp/guzzle: ~6.0|~7.0
- league/oauth2-client: ^2.4
- ocramius/package-versions: ^2.1
Requires (Dev)
- phpunit/phpunit: ^8.4|^9.0
This package is auto-updated.
Last update: 2025-09-29 02:03:19 UTC
README
PHP client for the SweepBright Website API. For terms of use and API credentials, refer to the official documentation.
Installation
composer require fw4/sweepbright-api
Usage
$client = new \SweepBright\SweepBright(); $accessToken = getAccessTokenFromDataStore(); if (empty($accessToken) || $accessToken->hasExpired()) { $accessToken = $client->requestAccessToken($clientId, $clientSecret); saveAccessTokenToDataStore($accessToken); } else { $client->setAccessToken($accessToken); } $estate = $client->getEstate($estateId);
The API client provides the following methods:
public function getEstate(string $estate_id): Responsepublic function setEstateUrl(string $estate_id, string $url): voidpublic function saveContact(array $data, ?array $preferences = null, ?array $location_preference = null): voidpublic function saveEstateContact(string $estate_id, array $data): void
For more information about available request parameters and response properties, refer to the official API documentation. Properties on both requests and responses are style agnostic, and are accessible through both snake_case and camelCase.