Exemplo n.º 1
0
 public function _fetchData($id)
 {
     $data = array('resource' => 'article', 'id' => $id);
     $response = OstoolbarRequest::makeRequest($data);
     if ($response->hasError()) {
         JFactory::getApplication()->enqueueMessage(JText::_('COM_OSTOOLBAR_API_KEY_ERROR'), 'error');
         return false;
     }
     $body = $response->getBody();
     $body->introtext = OstoolbarRequest::filter($body->introtext);
     $body->fulltext = OstoolbarRequest::filter($body->fulltext);
     return $body;
 }