From 40b3180c9bf7446b479ea99776a2b6598a6ad9c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Gon=C3=A7alves?= <joao@kamun.com.br> Date: Thu, 7 Dec 2023 23:23:29 -0300 Subject: [PATCH] Update readme with new regions. --- README.md | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index c3adae5..201c43c 100644 --- a/README.md +++ b/README.md @@ -148,10 +148,18 @@ $result = $managementClient->delete('spaces/' . $spaceId . '/stories/' . $storyI print_r($result); ``` -### Using spaces created in the US region for Management API +### Using spaces created in other regions for Management API -When creating a Space, you can select the EU or US region. -If you want to access a Space created in US region, you need to define the `apiEndpoint` parameter with 'api-us.storyblok.com' value, and forcing the `ssl` option for using HTTPS protocol: +When creating a Space, you can select the EU, US, CA, AP region. The default region is EU. +``` +EU: api.storyblok.com +US: api-us.storyblok.com +CA: api-ca.storyblok.com +AP: api-ap.storyblok.com +``` + +For example: +If you want to access a Space created in US region, you need to define the `apiEndpoint` parameter with `api-us.storyblok.com` value, and forcing the `ssl` option for using HTTPS protocol: ```php use Storyblok\ManagementClient; @@ -193,10 +201,12 @@ use Storyblok\Client as StoryblokClient; $client = new StoryblokClient('your-storyblok-readonly-accesstoken'); ``` -### Using spaces created in the US region +### Using spaces created in the other regions + +When you create a Space, you can select the region: EU, US, CA or AP. -When you create a Space, you can select the region: EU or US. -If you want to access a Space created in US region, you need to define the `apiRegion` parameter with 'us' value (or 'US'): +For example: +If you want to access a Space created in US region, you need to define the `apiRegion` parameter with the `us` value (or `US`): ```php use Storyblok\Client; @@ -219,7 +229,7 @@ $client = new Client( ); ``` -Now you have the `Storyblok\Client` instance you can start consuming data. +Now you have the `Storyblok\Client` instance you can start consuming data. ### Load a Story by slug