Skip to content

Commit

Permalink
add auto-onboard functionality to sdk (#95)
Browse files Browse the repository at this point in the history
* add auto-onboard functionality to sdk

* formatting

* formatting
  • Loading branch information
jonathanfeng-scale authored Sep 5, 2024
1 parent 54c3b3f commit 4961474
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
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

0 comments on commit 4961474

Please sign in to comment.