-
Notifications
You must be signed in to change notification settings - Fork 60
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
feat: make app_id a public API #137
feat: make app_id a public API #137
Conversation
Fixes #128 I decided to push two commits to this PR, since the seconds depends on the first. |
Hello @maartenbreddels I will be looking into this. |
Hi, Happy to add them! Regards, Maarten |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And for tests, you can follow the test suites that we already have, but around app publishing and un-publishing and examples of how you would use this change.
self.log.debug(f"App {app_id} status={status}") | ||
if status and status != "Stopped" and status != "Failed": | ||
url = self._routes.app_stop(app_id) | ||
response = self.request_manager.post(url) | ||
return response | ||
|
||
def __app_get_status(self, id) -> Optional[str]: | ||
app_id = self._app_id | ||
def app_id(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Set as a property as well.
# for backwards compatibility, we keep this property | ||
return self.app_id() | ||
|
||
def app_get_status(self, id) -> Optional[str]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
def def app_get_status(self, ext_app_id=None) -> Optional[str]:
app_id = ext_app_id if ext_app_id else self.app_id
if app_id is None: | ||
return None | ||
url = self._routes.app_get(app_id) | ||
response = self.request_manager.get(url).json() | ||
return response.get("status", None) | ||
|
||
def __app_get_status(self, id) -> Optional[str]: | ||
# for backwards compatibility, we keep this method | ||
return self.__app_get_status() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
meant to call app_get_status
?
close as out of date |
Fixes #127