Download the PHP package yudu/publisher without Composer
On this page you can find all versions of the php package yudu/publisher. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package publisher
YUDU Publisher REST API Wrapper Library 1.0.0
This repository is a convenient wrapper library in PHP used to interact with the YUDU Publisher REST API. The library enables simple access to the YUDU Publisher REST API via convenient and simple to use helper methods.
The building of request headers and signatures is abstracted away to make working with the API straightforward.
To gain a deeper understanding of the YUDU publisher REST API please see here for more details.
This library is intended as an example to assist developers in their interaction with the YUDU Rest API. The creators are not liable for how the library is used and as such it is the responsibility of any users of the library to ensure the testing and resilience of their own production systems.
Installation
This library can simply be installed with composer via packagist by using:
If unfamiliar with composer more information can be found here
How to get started?
To use this library you will need an active YUDU Publisher Key and Secret. The Key and Secret are required to create a Publisher client. Once instantiated the Publisher client can be used for multiple requests. The results can be transformed as required. Below demonstrates how the publisher client can be created and used.
Available methods and examples
Get Links
Get all readers
Get reader
Create reader
Update reader
Delete reader
Get Editions
Get Edition
Create Edition
Update Edition
Delete Edition
Get Permissions
Get Permission
Create Permission
Update Permission
Delete Permission
Get Reader Logins
Get reader Login
Get Publications
Get Publication
Get Subscriptions
Get Subscription
Get Subscription Periods
Get Subscription Period
Create Subscription Period
Update Subscription Period
Delete Subscription Period
Remove Devices
Authenticate Password
Create Token (Access to any edition)
Create Publication Token (Access editions at publication)
Create Edition Token (Access single edition only)
Send Targeted Notification
Get Categories
Create Category
Delete ALL Categories (from specific node)
Get Specific Category
Update Category
Delete Category
Get Category Editions
Create Category Edition
Delete Category Edition
Custom Request
In addition to using the methods above, it may be desirable to build the request manually. If this is the case the underlying request methods are exposed and chainable so that any request can be made. It doesnt matter what order the chained methods are added so long as the make() method is that last method to be called.
For example:
Handling responses
After making a call to Publisher a ResponseHandler object is returned. The Responsehandler is a wrapped Guzzle response which reveals convenient methods to assist in transforming the response into a chosen format.
Below demonstrates the methods that can be used after making a request:
Issues / Support
General support issues can be directed to [email protected]
When requesting support it will be helpful if you can provide the raw requests and responses for any api call you are attempting. This can be obtained by passing in the options array when instantiating the publisher library.
If you encounter a bug or have a technical question please open an issue on this repository.
All versions of publisher with dependencies
php Version >=7.2 || >=8.0
ext-simplexml Version *
ext-libxml Version *