public Snippet updateSnippet ( Object projectIdOrPath , Integer snippetId , String title , String filename , String description , String code , Visibility visibility ) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm ( ) . withParam ( "title" , title ) . withParam ( "file_name" , filename ) . withParam ( "description" , description ) . withParam ( "code" , code ) . withParam ( "visibility" , visibility ) ; Response response = put ( Response . Status . OK , formData . asMap ( ) , "projects" , getProjectIdOrPath ( projectIdOrPath ) , "snippets" , snippetId ) ; return ( response . readEntity ( Snippet . class ) ) ; }
Updates an existing project snippet . The user must have permission to change an existing snippet .