def to_api_data(self):
data = {'<STR_LIT>': self._gk(<EOL>'<STR_LIT>'.format(self.attachment_type)),<EOL>self._cc('<STR_LIT:name>'): self.name}<EOL>if self.attachment_type == '<STR_LIT:file>':<EOL><INDENT>data[self._cc('<STR_LIT>')] = self.content<EOL><DEDENT>else:<EOL><INDENT>data[self._cc('<STR_LIT>')] = self.content<EOL><DEDENT>return data<EOL>
Returns a dict to communicate with the server

        :rtype: dict