Patreon / patreon-php

Interact with the Patreon API via OAuth
Apache License 2.0
145 stars 41 forks source link

Patreon PHP Library 1.0.0 - using API v2 - Rebased from Dev fork to Patreon master #61

Closed codebard closed 5 years ago

codebard commented 5 years ago

Problem

PHP library needed overhauling for API v2, corrections to examples and directory structure, simplifying directory structure, new examples for webhooks, unified flow and for other objectives outlined in the concluded spec doc.

Solution

Library entirely overhauled to meet objectives. Full changelog:

Library moved to use Patreon API v2 endpoints and calls Scopes added to examples and API url functions Autoloading has been moved to PSR4 Art4 JSON parser library removed API class set to provide returns from the API in JSON, array, or object form - choice to parse in other ways (like using Art4 lib is left to the developer - ie, get JSON return and then feed to Art4 lib which can be installed separately) Caching of unique calls to API implemented in API class in order to speed up any repeated calls and reduce load on the API Library directory structure simplified Unnecessary includes and unnecessary files removed login_with_patreon.png and unlock_with_patreon.png images are added under assets/images for developers to use with their apps Unified flow example added to provide an example for content unlocking by having users login/register/pledge at Patreon and return to the app in just one smooth flow Webhook write example added - creates a webhook to notify your local app when there are any membership changes in your campaign Examples made more detailed and comprehensive Readme example reformatted, updated to API V2 Verification

Tagged as a release as 1.0.1 in dev fork, tested from dev package at packagist by installing at a live dev location. All calls work. Examples work.

Does this need tests

It should be tested again when it is tagged for release from Patreon master at github and updated at packagist. This should be done by installing it in a live location via composer and re-testing everything.