Skip to content
This repository has been archived by the owner on Dec 28, 2021. It is now read-only.

Host name should be input parameter #41

Closed
SivakumarBalu opened this issue Nov 7, 2019 · 3 comments · Fixed by #42
Closed

Host name should be input parameter #41

SivakumarBalu opened this issue Nov 7, 2019 · 3 comments · Fixed by #42

Comments

@SivakumarBalu
Copy link

Currently, host is hardcoded to old legacy url 'avs-alexa-eu.amazon.com'. AVS enforcing to use specific region Base URLs https://developer.amazon.com/docs/alexa-voice-service/api-overview.html#endpoints. For example, my client expected be connected with host North America Host Base URLs.

if the Host url is input parameter along with client id, secret and refresh_token, then it will useful to your package as it is instead of forking a copy.

@richtier
Copy link
Owner

richtier commented Nov 13, 2019

the supported way to do this is:

class ConnectionManager(alexa_client.connection.ConnectionManager):
    host = ...

class AlexaClient(alexa_client.AlexaClient):
    connection_manager_class = ConnectionManager

adding host as a first class citizen paramater is indeed a good idea. I'll get on this soon

@richtier
Copy link
Owner

you can now set the base_url when instantiating the client:

from alexa_client.alexa_client import constants

client = AlexaClient(
    client_id='my-client-id',
    secret='my-secret',
    refresh_token='my-refresh-token',
    base_url=constants.BASE_URL_ASIA
)

read more

@SivakumarBalu
Copy link
Author

Thanks for fixing on short span!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants