Method: Gitlab::Client::UserSnippets#user_snippet_raw

Defined in:
lib/gitlab/client/user_snippets.rb

#user_snippet_raw(id) ⇒ String

Get raw contents of a single snippet.

Examples:

Gitlab.user_snippet_raw(1)

Parameters:

  • id (Integer)

    ID of snippet to retrieve.

Returns:

  • (String)

    User snippet text

[View source]

35
36
37
38
39
40
# File 'lib/gitlab/client/user_snippets.rb', line 35

def user_snippet_raw(id)
  get("/snippets/#{id}/raw",
      format: nil,
      headers: { Accept: 'text/plain' },
      parser: ::Gitlab::Request::Parser)
end