Skip to content
This repository has been archived by the owner on Mar 27, 2024. It is now read-only.

Deprecate HeyPublisherXML class #128

Open
aguywithanidea opened this issue Aug 29, 2021 · 0 comments
Open

Deprecate HeyPublisherXML class #128

aguywithanidea opened this issue Aug 29, 2021 · 0 comments

Comments

@aguywithanidea
Copy link
Collaborator

The server is deprecating XML API support by the end of 2021. To support this, need to deprecate the HeyPublisherXML class in the code base. There are three sets of changes that need to be made:

Plugin Setup

There are a couple of functions (like authenticate) that call the server and create the new publisher (if it doesn't exist) or validates the publisher / login combination (if it exists) so that the plugin can accept submissions. Plugin set up functions will require new JSON endpoints on the server and associated code under the API::Setup namespace to accommodate.

Error Handling

This is primarily handled by print_webservice_errors and supporting functions that ensure response from the server is printable. This likely needs to be moved into the Page class, as it's about page functionality. The JSON API functions already set the $api->error var with appropriate error messages.

Random functions

There are a handful of useful functions that are referenced once or twice in the code, or are behind the scenes clean up functions, like:

  • searchable which converts publisher name into a URL for searching the HP database for matching record, or
  • sync_publisher_info which ensures that data updated on the server is synced and stored in the local WP database on the off chance an editor logs into heypubliser.com and makes an update that the plugin needs to know about.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant