/** * Marks comment as read * * @access public * @param object $data * @return array */ public function comment_create($data) { $options = array( 'method' => 'post', 'useHttps' => true, ); return $this->send_request(__FUNCTION__, $data, $options); }
require APPPATH.'controllers/common/common_types.php'; $types = array_merge_recursive( $types, array( // api methods 'methods' => array ( 'comment_create' => array( 'type' => 'public', 'returnType' => 'CommentEditReturn', 'description' => 'create comment', 'params' => array( 'data' => array( 'varName' => '$data', 'varType' => 'CommentEditInput', ), ) ), ), // api custom types for api methods 'types' => array( 'CommentCreateModel' => array( 'Text' => 'string', 'Work' => 'int', 'WorkDate' => 'string', 'Attaches' => 'CommentAttachment[]', ), 'CommentAttachment' => array( 'Add' => 'CommentAttachmentItem[]', ), 'CommentAttachmentItem' => array( 'Name' => 'string', 'Context' => 'string', ), ), ) );
// (,,=,=) =.; = .(.,.,""); .status.code = "ok" = WS.WSMegaPlanComments.WS("urn:comments","commentsService","commentsPort"); = .XDTO.(.XDTO.("urn:comments", "CommentEditInput")); .AccessId = .data.AccessId; .SecretKey = .data.SecretKey; .SubjectType="task"; .SubjectId=((),"=0"); = .XDTO.(.XDTO.("urn:comments", "CommentCreateModel")); .Text= XML(); .Work=; .WorkDate=(,"='dd.MM.yyyy hh:mm:ss'"); .Model=; = .comment_create(); ; " : ."; ; " :"+ . + (); ; // (, , ) = WS.WSMegaPlanTasks.WS("urn:tasks","tasksService","tasksPort"); = .XDTO.(.XDTO.("urn:tasks", "AuthorizationData")); .Login = ; = ""; md5(, ); .Password = ; .OneTimeKey = ; .authorize(); = (); " :"+ . + .; ;
Source: https://habr.com/ru/post/179241/
All Articles