Client
class Client extends Client
A Client is used to communicate the Contentful Delivery API.
A Client is only responsible for one Space. When access to multiple spaces is required, create multiple Clients.
This class can be configured to use the Preview API instead of the Delivery API. This grants access to not yet published content.
Constants
| VERSION |
|
Methods
Client constructor.
No description
No description
No description
Revive JSON previously cached.
Internal method for \Contentful\Delivery\Synchronization\Manager
Returns true when using the Preview API
Get an instance of the synchronization manager.
Details
at line 52
__construct($token, string $spaceId, bool $preview = false, LoggerInterface $logger = null)
Client constructor.
in Client at line 69
protected array|object
request(string $method, string $path, array $options = [])
at line 66
protected
getUserAgentAppName()
in Client at line 129
protected
getUserAgent()
in Client at line 147
protected object|array
decodeJson(string $json)
at line 78
Asset
getAsset(string $id)
at line 96
ResourceArray
getAssets(Query $query = null)
at line 114
ContentType
getContentType(string $id)
at line 130
ResourceArray
getContentTypes(Query $query = null)
at line 145
EntryInterface
getEntry(string $id)
at line 163
ResourceArray
getEntries(Query $query = null)
at line 179
Space
getSpace()
at line 199
Asset|EntryInterface
resolveLink(Link $link)
Resolve a link to it's resource.
at line 225
Asset|ContentType|DynamicEntry|Space|DeletedAsset|DeletedEntry|ResourceArray
reviveJson(string $json)
Revive JSON previously cached.
at line 242
mixed
syncRequest(array $queryData)
Internal method for \Contentful\Delivery\Synchronization\Manager
at line 257
bool
isPreview()
Returns true when using the Preview API
at line 272
Manager
getSynchronizationManager()
Get an instance of the synchronization manager.