Tk Listing Exporter
tk-listing-importer adds automatic listing import/export functionality to wordpress
by Mick Mifsud · github.com/tropotek/tk-listing-exporter · website
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/tropotek/tk-listing-exporter/archive/refs/heads/master.zipUse this in conjunction with the tk-listing-importer to add automatic listing import/export functionality to wordpress
Contents
Installation
Download the plugin at [https://github.com/tropotek/tk-listing-exporter] place it into your wordpress plugins folder then navigate to wp-admin plugin settings and activate the plugin.
Creating an export client
Before another site can import your listings, you need to create an export client for it:
-
In wp-admin, go to Settings → Listing Export.
-
Click Create Export Client.
-
Fill in:
Field What it's for Name A name or domain to identify the client (e.g. roatanmike.com)Secret Key Up to 32 characters. This, together with this site's URL, is what you give to the importing site's admin to enter into their Provider URL / Secret Key fields. Listing Author Restrict the client to listings by one author, or leave as -- ALL LISTINGS --to export everythingActive Uncheck to temporarily disable imports for this client without deleting it -
Click Create, then send the site URL and Secret Key to whoever manages the importing site — they'll need both to install tk-listing-importer and connect it here.
Introduction
See Documentation for more information.
REST API (v1)
The exporter exposes published listings for incremental sync under the
tk-listing-exporter/v1 namespace. All requests must send the encrypted client
secret in an X-TK-Key header (AES-128-CTR, same shared key/tk_listing_export_client
row as the legacy ?tk-listing-exporter= endpoint). Responses are author-scoped
to the client and limited to post_status = publish.
GET /manifest— lightweight change list: a JSON array of{ "id": int, "slug": string, "modified": "Y-m-d H:i:s" (GMT) }for every published listing. Slaves diff this to decide what to add/update/delete.GET /listings?ids=1,2,3— full payloads (max 20 ids) for the given listings:{ post, meta, terms, attachments, featured_source_id }. Unknown/unpublished ids are silently skipped.
Example:
curl -H "X-TK-Key: <encrypted-secret>" \
"https://roatanlife.com/?rest_route=/tk-listing-exporter/v1/manifest"