๐Ÿงช Tests and Simulations: Creating Custom API Endpoints, Testing OAuth Workflows, and Advanced Payment Automations

๐ŸŒ Running the Same Tests with cURL

If you prefer using cURL for command-line API testing, here are some cURL equivalents for the same tests:

Retrieving Members (GET Request):

curl -X GET "https://your-site.com/wp-json/mp/v1/members" \
-H "Authorization: Bearer YOUR_API_KEY"

Creating a Member (POST Request):

curl -X POST "https://your-site.com/wp-json/mp/v1/members" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"username": "newmember",
"email": "newmember@example.com",
"password": "strongpassword123"
}'

Updating Member Info (PUT Request):

curl -X PUT "https://your-site.com/wp-json/mp/v1/members/3" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"email": "newemail@example.com"}'

Deleting a Member (DELETE Request):

curl -X DELETE "https://your-site.com/wp-json/mp/v1/members/3" \
-H "Authorization: Bearer YOUR_API_KEY"