<s> from lib . actions import BaseAction <EOL> class CreateMessage ( BaseAction ) : <EOL> VISIBILITY = { <EOL> '<STR_LIT>' : <NUM_LIT:1> , <EOL> '<STR_LIT>' : <NUM_LIT:0> , <EOL> } <EOL> def run ( self , slug , message , visibility = '<STR_LIT>' , <EOL> suppress_notification = False ) : <EOL> payload = { <EOL> '<STR_LIT:message>' : { <EOL> '<STR_LIT:body>' : message , <EOL> '<STR_LIT>' : CreateMessage . VISIBILITY [ visibility ] <EOL> } <EOL> } <EOL> if suppress_notification : <EOL> payload [ '<STR_LIT>' ] = True <EOL> endpoint = '<STR_LIT>' . format ( slug ) <EOL> response = self . _api_post ( endpoint , json = payload ) <EOL> return response </s>
