|Kim Grytøyr 728dddb3b6||1 month ago|
|build||1 month ago|
|screenshots||1 month ago|
|src||1 month ago|
|.editorconfig||1 month ago|
|.gitignore||1 month ago|
|README.md||1 month ago|
|block.json||1 month ago|
|fnugg-api-client.php||1 month ago|
|fnugg-fetcher.php||1 month ago|
|package-lock.json||1 month ago|
|package.json||1 month ago|
|readme.txt||1 month ago|
This plugin will add a new Gutenberg block called “Fnugg Fetcher” that allows you to add a block with information about a ski resort from the Fnugg website.
It accesses the Fnugg API via an internal API located at
/wp-json/fnugg-fetcher/v1/resorts/. It supports three types of requests, all of them are
Searches for a resort and returns the necessary information about the resort.
Returns autocomplete suggestions based on the provided search term.
Returns the resort with
If a persistent cache storage (like Redis) is available, all responses will be cached based on the URL for 1800 seconds.
A few notes:
react-selectpackage for the autocomplete feature.
There is a fresh installation of WordPress for you to try this plugin on located at https://wp.dev.grytoyr.io. Contact me if you need the credentials.
/wp-content/plugins/fnugg-fetcherdirectory, or install the plugin through the WordPress plugins screen directly.
Add a new Gutenberg block by typing
/fnugg-fetcher in the editor. Enter the search term in the text field and use the arrow keys and «enter» or the mouse to select the resort you’d like to add. Save the post or page and you’re done!