HeyPublisher / heypublisher-submission-manager

HeyPublisher Wordpress Plugin
GNU General Public License v2.0
2 stars 1 forks source link

Plugin needs to send 'version' with each API call, regardless of end-point #113

Closed aguywithanidea closed 3 years ago

aguywithanidea commented 3 years ago

In trying to end-of-life very old versions of the plugin, a gap has been identified in that the plugin does not always send it's version number along to the API when making a request. Some of the requests do; some don't.

TODO: Each and every call to the API should include it's version number in a way that is appropriate for that endpoint schema.

aguywithanidea commented 3 years ago

Currently, only the submissions/list and submissions/show calls send the version.

aguywithanidea commented 3 years ago

For the JSON endpoints this will be added in the headers, as:

Accept: application/vnd.xm.device+json;version=1.5.0

where VERSION is the plugin version

For the XML endpoints this will be added to the publisher section of the request, like:

<request>
    <account>
        <oid>{{user_oid}}</oid>
    </account>
    <publisher>
        <oid>{{publisher_oid}}</oid>
        <version>1.5.0</version>
    </publisher>
</request>
aguywithanidea commented 3 years ago

deployed