function doPostToMe2day($user_id, $user_key, $body, $tags) { require_once $this->module_path . 'libs/me2day.api.php'; $oMe2 = new me2api($user_id, $user_key); return $oMe2->doPost($body, $tags); }
function sendMe2day($user_id, $user_key) { require_once _XE_PATH_ . 'modules/textyle/libs/me2day.api.php'; if (!$user_id || !$user_key) { return; } $oMe2 = new me2api($user_id, $user_key); $output = $oMe2->doPost(sprintf('"%s":%s', $this->oDocument->getTitleText(), $this->oDocument->getPermanentUrl()), $this->oDocument->get('tags')); if ($output->toBool()) { $this->published_me2day = true; } }
function procTextyleCheckMe2day() { require_once $this->module_path . 'libs/me2day.api.php'; $vars = Context::gets('me2day_userid', 'me2day_userkey'); $oMe2 = new me2api($vars->me2day_userid, $vars->me2day_userkey); $output = $oMe2->chkNoop($vars->me2day_userid, $vars->me2day_userkey); if ($output->toBool()) { return new Object(-1, 'msg_success_to_me2day'); } return new Object(-1, 'msg_fail_to_me2day'); }