Skip to content

Commit

Permalink
adding function to get code
Browse files Browse the repository at this point in the history
  • Loading branch information
harshits committed Jan 2, 2020
1 parent d5aeb0e commit 342c8e8
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions qds_sdk/quest.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,14 @@ def set_alert(pipeline_id, channel_id):
url = Quest.rest_entity_path + "/" + pipeline_id + "/alerts"
return conn.put(url, data)

@staticmethod
def get_code(pipeline_id):
url = Quest.rest_entity_path + "/" + pipeline_id
conn = Qubole.agent()
reponse = conn.get(url)
code = reponse.get("meta")["command_details"]["code"]
return code


class QuestCode(Quest):
create_type = 3
Expand Down

0 comments on commit 342c8e8

Please sign in to comment.