This project use Wordpress Version 5.3
Developed to expose the PokeApi.co through the WP-REST-API
/wp-json/pokeapi/v1/pokemon
/wp-json/pokeapi/v1/pokemon/1
Developed to include my_pokemon_ids
as new user metadata field. Add the following code into your current theme under functions.php
file
register_meta('user', 'my_pokemon_ids', array(
"type" => "string",
"show_in_rest" => true,
"single" => true
));
Add the following lines into the wp-config.php
file of wordpress
define('JWT_AUTH_SECRET_KEY', 'secret_key');
define('JWT_AUTH_CORS_ENABLE', true);
Add the following lines into the .htaccess
file of root folder
RewriteCond %{HTTP:Authorization} ^(.*)
RewriteRule ^(.*) - [E=HTTP_AUTHORIZATION:%1]
SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1