From f7fbfca7e6a32a31dbf7ca8e1d4f83b34b7ac9db Mon Sep 17 00:00:00 2001 From: Gauvain Pocentek Date: Sun, 28 Oct 2018 10:54:06 +0100 Subject: [PATCH] [docs] Add an example of pipeline schedule vars listing Closes #595 --- docs/gl_objects/builds.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/gl_objects/builds.rst b/docs/gl_objects/builds.rst index 51e7496c1..ee450905a 100644 --- a/docs/gl_objects/builds.rst +++ b/docs/gl_objects/builds.rst @@ -141,6 +141,13 @@ Delete a schedule:: sched.delete() +List schedule variables:: + + # note: you need to use get() to retrieve the schedule variables. The + # attribute is not present in the response of a list() call + sched = projects.pipelineschedules.get(schedule_id) + vars = sched.attributes['variables'] + Create a schedule variable:: var = sched.variables.create({'key': 'foo', 'value': 'bar'})