legacy-json.php
The legacy JSON-API for submitting exchange requests, now superseeded by the WP REST Wallets Exchange API.
Since 6.0.0 this API is deprecated and may be removed in a future version.
To enable this API, the To developers: Please migrate your apps to the new WP REST API as soon as possible! This JSON API is deprecated and will soon be removed because it sucks. It is here to allow migration for users who have already built Android apps.
Tags
Table of Contents
Functions
- json_api_exchange_query_vars() : mixed
- json_api_parse_exchange_request() : mixed
- rate_limit() : mixed
- get_effective_exchange_user_id() : mixed
- Gets the effective user id, based on current login or API key.
- warn_if_not_zlib() : mixed
- verify_exchange_args_exist() : mixed
- cache_response() : mixed
- do_not_cache_response() : mixed
- superpwa_exclude_wallets_from_cache() : string
- Exclude JSON API from being cached by SuperPWA
- refresh_superpwa_exclusion_list() : mixed
- Forces SuperPWA to re-generate the service worker code once.
Functions
json_api_exchange_query_vars()
json_api_exchange_query_vars(mixed $vars) : mixed
Parameters
- $vars : mixed
json_api_parse_exchange_request()
json_api_parse_exchange_request(mixed $query) : mixed
Parameters
- $query : mixed
rate_limit()
rate_limit(mixed $action, mixed $user_id) : mixed
Parameters
- $action : mixed
- $user_id : mixed
get_effective_exchange_user_id()
Gets the effective user id, based on current login or API key.
get_effective_exchange_user_id() : mixed
In case of programmatic access, checks that the specified user_id matches with the API key passed. Checks the the wallets_api_key GET parameter, the Bearer HTTP_AUTHORIZATION header, and the Authorization header.
Tags
warn_if_not_zlib()
warn_if_not_zlib() : mixed
verify_exchange_args_exist()
verify_exchange_args_exist(mixed $arg_names) : mixed
Parameters
- $arg_names : mixed
cache_response()
cache_response(mixed $seconds_to_cache) : mixed
Parameters
- $seconds_to_cache : mixed
do_not_cache_response()
do_not_cache_response() : mixed
superpwa_exclude_wallets_from_cache()
Exclude JSON API from being cached by SuperPWA
superpwa_exclude_wallets_from_cache(string $superpwa_sw_never_cache_urls) : string
Parameters
- $superpwa_sw_never_cache_urls : string
-
Comma separated list of regex patterns that match against request URL.
Tags
Return values
string —The modified list of regex patterns.
refresh_superpwa_exclusion_list()
Forces SuperPWA to re-generate the service worker code once.
refresh_superpwa_exclusion_list() : mixed
Newly generated code takes into account the URL exclusion list (superpwa_sw_never_cache_urls
filter)
that allows this plugin's JSON API to pass through.