Skip to content

Commit 98017d5

Browse files
committed
Fix Snippet.get_raw() and add Snippet.raw() alias
1 parent 2275e53 commit 98017d5

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

gitlab3/_api_definition.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -339,12 +339,14 @@ class Snippet(APIDefinition):
339339
'lifetime',
340340
]
341341

342-
class GetRawAction(ExtraActionDefinition):
343-
"""gl.Project.Snippet.get_raw()"""
344-
url = '/snippets/:snippet_id/raw'
342+
class RawAction(ExtraActionDefinition):
343+
"""gl.Project.Snippet.raw()"""
344+
url = '/raw'
345345
method = _HTTP_GET
346+
class GetRawAction(RawAction):
347+
pass
346348

347-
extra_actions = [ GetRawAction ]
349+
extra_actions = [ RawAction, GetRawAction ]
348350
sub_apis = [ Note ]
349351

350352
class Tag(APIDefinition):

0 commit comments

Comments
 (0)