Example #1
0
        break;
    case 'publish_article':
        $auth = new Auth($apikey, $secret);
        if ($auth->isAuthenticate()) {
            $article = new Article();
            $article->sync($_POST);
            //$article->sync($_GET);
        }
        break;
    case 'getArticles':
        header("content-type: text/xml");
        $auth = new Auth($apikey, $secret);
        if ($auth->isAuthenticate()) {
            $article = new Article();
            print $article->getArticles();
        }
        break;
    case 'uploadImage':
        $auth = new Auth($apikey, $secret);
        if ($auth->isAuthenticate()) {
            $article = new Article();
            $article->uploadImage($_POST);
            //print WebserviceHelper::contructResultData(200,"Category Retrieval Successful",$article->getCategories(), getCategories);
        }
        break;
    default:
        header("content-type: text/xml");
        $result = WebserviceHelper::constructResult(500, 'Not a valid Method', 'Unknown');
        print $result->asXML();
        break;
}