Example #1
0
                        }
                        if (count($mapping_dt) < 1) {
                            array_push($mapping_rt_errors2, $zType);
                        } else {
                            $mapping_dt["h3rectype"] = $rt_id;
                            $mapping_rt[$zType] = $mapping_dt;
                        }
                    }
                }
            }
        }
    }
}
///foreach
$zotero = null;
$zotero = new phpZotero($api_Key);
print "<div><b>zotero has been initiated with api key [{$api_Key}]</b></div>";
print "<br>";
/* test connection
$items = $zotero->getItemsTop($group_ID,
array('format'=>'atom', 'content'=>'none', 'start'=>'0', 'limit'=>'1', 'order'=>'dateModified', 'sort'=>'desc' ));
$code = $zotero->getResponseStatus();
print $code;

//test new library
$zotero = new \Zotero\Library('user', $user_ID, 'Library', $api_Key);
$permissions = $zotero->getKeyPermissions('','');
print json_encode($permissions, JSON_PRETTY_PRINT);

$items = $zotero->fetchItemsTop(array(
'format'=>'atom', 'content'=>'none', 'start'=>'0', 'limit'=>'10', 'order'=>'dateModified', 'sort'=>'desc' ));
Example #2
0
<?php

require_once 'config.php';
require_once PHP_ZOTERO_PATH;
require_once PHP_ZOTERO_ENTRIES_PATH;
$z = new phpZotero($zoteroUserName, $zoteroUserKey);
$feed = $z->getUserItems(array('start' => 0));
$ze = new phpZoteroEntries($feed);
//print_r( $ze->getUris() );
//print_r( $ze->getTypes() );
//print_r( $ze->getEntriesGroupedByType() );
print_r($ze->getEntriesByType('webpage', true));
//header('Content-type: application/json');
//echo $ze->getEntriesAsJSON();
//echo $ze->getRdf('rdf/json');