Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Integration fails to setup #211

Merged
merged 4 commits into from
Feb 1, 2024
Merged

Conversation

victorkp
Copy link
Contributor

Fixes URL issues for US region users, while still retaining the old URL for non-US users.

This is a replacement for #203, which breaks the URL for non-US users.

Fixes URL issues for US region users, while still retaining the old URL for non-US users.
@victorkp victorkp mentioned this pull request Nov 25, 2023
@jocxfin
Copy link

jocxfin commented Dec 2, 2023

@victorkp In my opinion this woud be a better solution if there were to be cases in the future where multiple location based urls are used.

# Starting in 2023, US users need to point at the aoa (Audi of America) URL.
base_url = "https://app-api.live.my.audi.com/vgql/v1/graphql"
usa_url = "https://app-api.my.aoa.audi.com/vgql/v1/graphql"

request_url = usa_url if self._country.upper() == "US" else base_url

req_rsp, rep_rsp_txt = await self._api_request(
    "POST",
    request_url,
    json.dumps(req_data),
    headers=headers,
    allow_redirects=False,
)

@derhappy
Copy link

derhappy commented Dec 2, 2023

AFAIK that’s how it was implemented some time ago. That’s why you have to give the region when you install the integration.

@cdnninja cdnninja changed the title Fix URL for US users fix: Integration fails to setup Feb 1, 2024
@cdnninja cdnninja merged commit 61fa545 into audiconnect:master Feb 1, 2024
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants