Package gitlab3 :: Class GitLab :: Class Project :: Class Snippet
[hide private]
[frames] | no frames]

Class Snippet

A project snippet. See http://github.com/gitlabhq/gitlabhq/blob/master/doc/api/project_snippets.md

Nested Classes [hide private]
  Note
A snippet note.
Instance Methods [hide private]
 
save()
Update GitLab with changes to this Snippet
 
delete()
Delete this Snippet
 
raw()
Returns the raw snippet as plain text.
 
get_raw()
Alias to raw().
 
notes(limit=None, page=None, per_page=None)
Return a list of Snippet notes.
 
find_note(find_all=False, cached=None, **kwargs)
Find the first matching Note whose properties match all of the key, value pairs given in the arguments.
 
note(id)
Return the Note specified by the given id.
 
add_note(body)
Add a new note to this Snippet
Method Details [hide private]

notes(limit=None, page=None, per_page=None)

 

Return a list of Snippet notes.

limit can be given to specify the maximum list size.

page and per_page can be used for pagination.

limit should not be specified with either page or per_page. If it is, limit takes precedence.

find_note(find_all=False, cached=None, **kwargs)

 

Find the first matching Note whose properties match all of the key, value pairs given in the arguments.

If find_all is true, a list of all matching notes will be returned. If a cached list is not given, the list to search will be queried from the server each time this is called.

Searching is done via an unoptimized, inefficient o(n) search.

All arguments must be named.

note(id)

 

Return the Note specified by the given id. get_note() may be used as an alias for this function.

add_note(body)

 

Add a new note to this Snippet

On success, the newly created object is returned.