Skip to content

Fix addons url functions #189

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

Conversation

iLLiCiTiT
Copy link
Member

Changelog Description

Function get_addon_url does return REST api url by default instead of base url. Added new function get_addon_endpoint to be able to choose between REST and resources endpoint if needed.

Additional information

Added helper method to cleanup endpoint.

Testing notes:

You can copy paste code from this PR to AYON launcher.

  1. Downloading of files from AYON server still works. You can remove an addon from appdirs and start AYON launcher to download it again.
  2. Function get_addon_settings_schema actually works and returns schema.

Resolves #184

@iLLiCiTiT iLLiCiTiT added the type: bug Something isn't working label Oct 9, 2024
@iLLiCiTiT iLLiCiTiT self-assigned this Oct 9, 2024
@iLLiCiTiT iLLiCiTiT requested a review from kalisp October 9, 2024 14:56
@@ -1323,49 +1324,44 @@ def _do_rest_request(self, function, url, **kwargs):
return new_response

def raw_post(self, entrypoint, **kwargs):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

entrypoint == endpoint ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be endpoint, not sure if is related to this PR?

@kalisp kalisp self-requested a review October 9, 2024 16:31
Copy link
Member

@kalisp kalisp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems to work, experimented with both methods.

@iLLiCiTiT iLLiCiTiT merged commit b784b51 into develop Oct 9, 2024
1 check passed
@iLLiCiTiT iLLiCiTiT deleted the bugfix/184-serverapiget_addon_settings_schema-requested-url-is-wrong branch October 9, 2024 17:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ServerAPI.get_addon_settings_schema : Requested URL is wrong
2 participants