From 5292ffb366f97e4dc611dfd49a1dca7d1e934f4c Mon Sep 17 00:00:00 2001 From: Gauvain Pocentek Date: Sun, 20 May 2018 09:01:05 +0200 Subject: [docs] Rework the examples pages * Get rid of the .py files and bring all the python examples in the RST files * Fix a few things --- docs/gl_objects/snippets.py | 33 --------------------------------- 1 file changed, 33 deletions(-) delete mode 100644 docs/gl_objects/snippets.py (limited to 'docs/gl_objects/snippets.py') diff --git a/docs/gl_objects/snippets.py b/docs/gl_objects/snippets.py deleted file mode 100644 index 87d1a42..0000000 --- a/docs/gl_objects/snippets.py +++ /dev/null @@ -1,33 +0,0 @@ -# list -snippets = gl.snippets.list() -# end list - -# public list -public_snippets = gl.snippets.public() -# end public list - -# get -snippet = gl.snippets.get(snippet_id) -# get the content - API v4 -content = snippet.content() - -# get the content - API v3 -content = snippet.raw() -# end get - -# create -snippet = gl.snippets.create({'title': 'snippet1', - 'file_name': 'snippet1.py', - 'content': open('snippet1.py').read()}) -# end create - -# update -snippet.visibility_level = gitlab.Project.VISIBILITY_PUBLIC -snippet.save() -# end update - -# delete -gl.snippets.delete(snippet_id) -# or -snippet.delete() -# end delete -- cgit v1.2.1