Authentication: alle API Anfragen benötigen HTTP Basic Auth (Login)
Beispiel: Example
posts/all | fetch all bookmarks by date or index range | |
posts/add | add a new bookmark | |
posts/delete | delete an existing bookmark | |
posts/get | get bookmark for a single date, or fetch specific items | |
posts/recent | fetch recent bookmarks | |
posts/dates | list dates on which bookmarks were posted | |
posts/update | check to see when a user last posted an item |
tags/get | fetch all tags | |
tags/rename | rename a tag on all posts |
get all bookmarks (by tag/date)
&tag={TAG}
(optional) Filter by this tag.
&start={xx}
(optional) Start returning posts this many results into the set.
&results={xx}
(optional) Return this many results.
&fromdt={CCYY-MM-DDThh:mm:ssZ}
(optional) Filter for posts on this date or later
&todt={CCYY-MM-DDThh:mm:ssZ}
(optional) Filter for posts on this date or earlier
&meta=yes
(optional) Include change detection signatures on each item
Add a post (bookmark)
&url={URL}
(required) the url of the item.
&description={...}
(required) the description of the item.
&extended={...}
(optional) notes for the item.
&tags={...}
(optional) tags for the item (comma delimited).
&dt={CCYY-MM-DDThh:mm:ssZ}
(optional) datestamp of the item (format "CCYY-MM-DDThh:mm:ssZ").
Requires a LITERAL "T" and "Z" like in ISO8601 example: "1984-09-01T14:21:31Z"
&replace=no
(optional) don't replace post if given url has already been posted.
&shared=yes
(optional) make the item public or private
Delete a post (bookmark)
&url={URL}
(required) the url of the item.
Returns one or more posts (bookmarks) on a single day matching the arguments.
If no date or url is given, most recent date will be used.
&tag={TAG}+{TAG}+...+{TAG}
(optional) Filter by this tag.
&dt={CCYY-MM-DDThh:mm:ssZ}
(optional) Filter by this date, defaults to the most recent date on which bookmarks were saved.
&url={URL}
(optional) Fetch a bookmark for this URL, regardless of date.
Note: Be sure to URL-encode the argument value.
&hashes={MD5}+{MD5}+...+{MD5}
(optional) Fetch multiple bookmarks by one or more URL MD5s regardless of date,
separated by URL-encoded spaces (ie. '+').
&meta=yes
(optional) Include change detection signatures on each item in a 'meta' attribute.
Returns a list of the most recent posts (bookmarks) , filtered by argument. Maximum 100.
&tag={TAG}
(optional) Filter by this tag.
&count={1..100}
(optional) Number of items to retrieve (Default:15, Maximum:100).
Returns a list of dates with the number of posts (bookmarks) at each date.
&tag={TAG}
(optional) Filter by this tag
Returns the last update time for the user, as well as the number of new items in the user's inbox since it was last visited
<none>
Returns a list of tags and number of times used by a user.
<none>
Rename an existing tag with a new tag name.
&old={TAG}
(required) Tag to rename.
&new={TAG}
(required) New tag name.
(Example: posts/all API Request)
Die Zugangsdaten mit YourUsername und YourPassword
erstellen Sie durch die Registrierung / Anmeldung bei favon.12hp.de
als User
<?php // ---------------------------------------------- ### // ----- Config ----- /* ------------------------------------------ */ $username = 'YourUsername'; $passwort = 'YourPassword'; $bservice = 'http://favon.12hp.de/'; $b_method = 'posts/all'; $searchtag = ''; // ---- search for tag or keyword leave blank for all $res_limit = '10'; // ---- results limit (maximum items, 1 to 1000) // ---------------------------------------------- ### // ----- Settings ----- /* ------------------------------------------ */ $bservice = str_replace('http://,'',$bservice); $bservice = rtrim($bservice,'/'); $serviceurl = 'http://'.$username.':'.$passwort.'@'.$bservice.'/api/'.$b_method.''; $parameter = '?tag='.$searchtag.'&results='.$res_limit.'&meta=yes'; // ---------------------------------------------- ### // ----- Request (UEL) Result (XML) ----- /* ------------------------------------------ */ $serviceapi = $serviceurl.''.$parameter; $res_string = file_get_contents($serviceapi); // ---------------------------------------------- ### // ----- Ausgabe XML String ----- /* ------------------------------------------ */ print "<br />\n"; print "<br />\n"; print "<pre style="text-align:left; background:#DEDEDE; color:#000066;">\n"; print htmlentities( print_r($res_string, true) ); print "</pre>\n"; print "<br />\n"; print "<br />\n"; // ---------------------------------------------- ### // ----- Ausgabe XML to PHP Objekt ----- /* ------------------------------------------ */ $res_data = simplexml_load_string($res_string); print "<br />\n"; print "<br />\n"; print "<pre style="text-align:left; background:#DEDEDE; color:#000066;">\n"; print_r($res_data); print "</pre>\n"; print "<br />\n"; print "<br />\n"; // ---------------------------------------------- ?>
... mehr Infos zur Delicious API siehe auch: delicious.com/developers (Methoden, Parameter)
Die Zugangsdaten mit YourUsername und YourPassword
erstellen Sie durch die Registrierung / Anmeldung bei favon.12hp.de
als User