module Gitlab::Client::Snippets
def create_snippet(project, options = {})
-
(Gitlab::ObjectifiedHash)
- Information about created snippet.
Options Hash:
(**options)
-
:visibility
(String
) -- The visibility of a snippet -
:lifetime
(String
) -- The expiration date of a snippet. -
:code
(String
) -- The content of a snippet. -
:file_name
(String
) -- The name of a snippet file. -
:title
(String
) -- The title of a snippet.
Parameters:
-
options
(Hash
) -- A customizable set of options. -
project
(Integer, String
) -- The ID or name of a project.
def create_snippet(project, options = {}) post("/projects/#{url_encode project}/snippets", body: options) end