Skip to content

Commit f4ec73c

Browse files
committed
Use new hostnames for the api/auth examples
The documentation was still using the *.sphere.io hostnames. Update to the *.commercetools.com hostnames
1 parent 47521cd commit f4ec73c

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

README.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ Example
4040
client_id="<your-client-id>",
4141
client_secret="<your-client-secret>",
4242
scope=["<scopes>"],
43-
url="https://api.sphere.io",
44-
token_url="https://auth.sphere.io",
43+
url="https://api.europe-west1.gcp.commercetools.com",
44+
token_url="https://auth.europe-west1.gcp.commercetools.com",
4545
)
4646
4747
product = (
@@ -59,8 +59,8 @@ variables:
5959
6060
export CTP_CLIENT_SECRET="<client secret>"
6161
export CTP_CLIENT_ID="<client id>"
62-
export CTP_AUTH_URL="https://auth.sphere.io"
63-
export CTP_API_URL="https://api.sphere.io"
62+
export CTP_AUTH_URL="https://api.europe-west1.gcp.commercetools.com"
63+
export CTP_API_URL="https://auth.europe-west1.gcp.commercetools.com"
6464
export CTP_SCOPES="<comma seperated list of scopes>"
6565
6666
And then constructing a client without arguments:

docs/index.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ Example
2626
client_id="<your-client-id>",
2727
client_secret="<your-client-secret>",
2828
scope=["<scopes>"],
29-
url="https://api.sphere.io",
30-
token_url="https://auth.sphere.io/oauth/token",
29+
url="https://api.europe-west1.gcp.commercetools.com",
30+
token_url="https://auth.europe-west1.gcp.commercetools.com/oauth/token",
3131
)
3232
3333
product = client.products.get_by_id("00633d11-c5bb-434e-b132-73f7e130b4e3")
@@ -42,8 +42,8 @@ variables:
4242
export CTP_PROJECT_KEY="<project key>"
4343
export CTP_CLIENT_SECRET="<client secret>"
4444
export CTP_CLIENT_ID="<client id>"
45-
export CTP_AUTH_URL="https://auth.sphere.io"
46-
export CTP_API_URL="https://api.sphere.io"
45+
export CTP_AUTH_URL="https://auth.europe-west1.gcp.commercetools.com"
46+
export CTP_API_URL="https://api.europe-west1.gcp.commercetools.com"
4747
export CTP_SCOPES="<comma seperated list of scopes>"
4848
4949
And then constructing a client without arguments:

src/commercetools/testing/abstract.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ class GenericSchema(traits.QuerySchema, traits.SortableSchema, traits.PagingSche
189189

190190

191191
class ServiceBackend(BaseBackend):
192-
hostnames = ["api.sphere.io", "localhost"]
192+
hostnames = ["api.europe-west1.gcp.commercetools.com", "api.sphere.io", "localhost"]
193193
model_class: typing.Any = None
194194
_schema_draft: typing.Optional[typing.Type[marshmallow.Schema]] = None
195195
_schema_update: typing.Optional[typing.Type[marshmallow.Schema]] = None

src/commercetools/testing/auth.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def is_valid(self, client_id, client_secret):
2020

2121
class AuthBackend(BaseBackend):
2222
path_prefix = r"/oauth/(?P<path>.*)"
23-
hostnames = ["auth.sphere.io", "localhost"]
23+
hostnames = ["auth.europe-west1.gcp.commercetools.com", "auth.sphere.io", "localhost"]
2424
model_class = AuthModel
2525

2626
def __init__(self, *args, **kwargs):

0 commit comments

Comments
 (0)