Пример #1
0
 /**
  * Make API request to create a new item
  *
  * @param Zotero_Item $item the newly created Zotero_Item to be added to the server
  * @return Zotero_Response
  */
 public function createItem($item)
 {
     $createItemJson = json_encode(array('items' => array($item->newItemObject())));
     //libZoteroDebug( $createItemJson );die;
     $aparams = array('target' => 'items');
     $reqUrl = $this->apiRequestUrl($aparams) . $this->apiQueryString($aparams);
     $response = $this->_request($reqUrl, 'POST', $createItemJson);
     return $response;
 }