Fetching lists and their content
The OCListProvider is a class dedicated to fetching Lists and their content.
Introduction
This provider will use the Everyware "Document cache" to minimize the amount of requests against Open Content.
To request content from the List (i.g. articles) is a bit tricker though. There might be alot of reasons why a "list article" can't be fetched and the only way to find this out is to actually request them. That is why the list content is fetched through a search query and will therefore use the "Response cache" instead.
Usage
Use the OcAPI
instance or a \Everyware\Contracts\OcApiProvider
interface to instantiate a new provider:
Request the List
using a UUID
. This will result in the new improved \Everyware\Contracts\OcObject
where you have acess the entire object.
You can also request certain properties from the List
.
To request the accessible content from the List
i.e. uuids of articles
You can further filter your relations with a OC query. This query will only affect the relations and not the List
itself.
Last updated