Skip to content

Commit 85f2388

Browse files
author
Gauvain Pocentek
authored
Merge pull request python-gitlab#484 from Matusf/docs-example-raises-attribute-error
Change method for getting content of snippet
2 parents 736fece + 5c16c8d commit 85f2388

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

docs/gl_objects/snippets.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@
88

99
# get
1010
snippet = gl.snippets.get(snippet_id)
11-
# get the content
11+
# get the content - API v4
12+
content = snippet.content()
13+
14+
# get the content - API v3
1215
content = snippet.raw()
1316
# end get
1417

0 commit comments

Comments
 (0)