diff --git a/easyblog/easyblog.php b/easyblog/easyblog.php new file mode 100644 index 0000000..7966647 --- /dev/null +++ b/easyblog/easyblog.php @@ -0,0 +1,23 @@ + + + Api - Easyblog + 1.0 + July 2014 + techjoomla + contact@techjoomla.com + http://techjoomla.com + Techjoomla + GNU General Public License v2 + Easyblog APIs + + + easyblog.php + easyblog + + diff --git a/easyblog/easyblog/blog.php b/easyblog/easyblog/blog.php new file mode 100644 index 0000000..4341276 --- /dev/null +++ b/easyblog/easyblog/blog.php @@ -0,0 +1,78 @@ +plugin->setResponse( $this->getErrorResponse(404, 'Easyblog not installed') ); + return; + } + require_once( JPATH_ROOT . '/components/com_easyblog/helpers/helper.php' ); + } + public function delete() + { + $this->plugin->setResponse( 'in delete' ); + } + + public function post() + { + $input = JFactory::getApplication()->input; + $blog = EasyBlogHelper::getTable( 'Blog', 'Table' ); + $post = $input->post->getArray(array()); + + $blog->bind($post); + $blog->created_by = $this->plugin->getUser()->id; + + if (!$blog->store()) { + $this->plugin->setResponse( $this->getErrorResponse(404, $blog->getError()) ); + return; + } + + $item = EasyBlogHelper::getHelper( 'SimpleSchema' )->mapPost($blog, '