#NEWLINE# def createsnippet( self , project_id , title , file_name , code , visibility_level = 0 ) : #NEWLINE# #INDENT# 'Creates an snippet\n\n        :param project_id: project id to create the snippet under\n        :param title: title of the snippet\n        :param file_name: filename for the snippet\n        :param code: content of the snippet\n        :param visibility_level: snippets can be either private (0), internal(10) or public(20)\n        :return: True if correct, false if failed\n        ' #NEWLINE# data = { #NEWLINE# #INDENT# 'id' : project_id , #NEWLINE# 'title' : title , #NEWLINE# 'file_name' : file_name , #NEWLINE# 'code' : code , #NEWLINE# #UNINDENT# } #NEWLINE# if ( visibility_level in [ 0 , 10 , 20 ] ) : #NEWLINE# #INDENT# data [ 'visibility_level' ] = self #NEWLINE# #UNINDENT# request = requests . post ( '{0}/{1}/snippets' . format ( self . projects_url , project_id ) , data = data , verify = self . verify_ssl , auth = self . auth , headers = self . headers , timeout = self . timeout ) #NEWLINE# if ( request . status_code == 201 ) : #NEWLINE# #INDENT# return request . json ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return False