Skip to content

add auto-onboard functionality to sdk #95

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

Merged
merged 3 commits into from
Sep 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion scaleapi/_version.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
__version__ = "2.15.13"
__version__ = "2.15.14"
__package_name__ = "scaleapi"
10 changes: 10 additions & 0 deletions scaleapi/projects.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ def __init__(self, json, client):
self.created_at = json["created_at"]
self.updated_at = json["updated_at"]
self.template_variables = json["template_variables"]
self.response_schema = json.get("response_schema", None)
self.auto_onboard_enabled = json.get("auto_onboard_enabled", False)

def __hash__(self):
return hash(self.id)
Expand All @@ -23,6 +25,14 @@ def get_template_variables(self):
"""Returns template variables dictionary"""
return self.template_variables

def is_auto_onboardable(self):
"""Returns boolean value whether project is auto onboardable"""
return self.auto_onboard_enabled

def get_response_schema(self):
"""Returns response schema if enabled for your account"""
return self.response_schema

def as_dict(self):
"""Returns task template object as JSON dictionary"""
return self._json
Expand Down