API - Application Programming Interface

Authentication: alle API Anfragen benötigen HTTP Basic Auth (Login)

 

Methoden

posts (Bookmarks)

  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 (Keywords)

  tags/get fetch all tags
  tags/rename rename a tag on all posts

 

Parameter

posts/all

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

 

posts/add

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

 

posts/delete

Delete a post (bookmark)

&url={URL}
   (required) the url of the item.

 

posts/get

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.

 

posts/recent

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).

 

posts/dates

Returns a list of dates with the number of posts (bookmarks) at each date.

&tag={TAG}
   (optional) Filter by this tag

 

posts/update

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>

 

tags/get

Returns a list of tags and number of times used by a user.

<none>

 

tags/rename

Rename an existing tag with a new tag name.

&old={TAG}
   (required) Tag to rename.

&new={TAG}
   (required) New tag name.

 

 

Beispiele / PHP

(Example: posts/all API Request)

<?php // ---------------------------------------------- $username = 'YourUsername'; $passwort = 'YourPassword'; $bservice = 'favoriten.12hp.de'; $b_method = 'posts/all'; $serviceurl = 'http://'.$username.':'.$passwort.'@'.$bservice.'/api/'.$b_method.''; $searchtag = 'favoriten'; // ---- search for tag or leave blank $res_limit = '10'; // ---- results limit (maximum items) $parameter = '?tag='.$searchtag.'&results='.$res_limit.'&meta=yes'; $serviceapi = $serviceurl.$parameter; $res = file_get_contents($serviceapi); ### echo $res; // Ausgabe XML Code $res_info = htmlentities($res); echo "<pre>\r\n"; print_r($res_info); echo "</pre>\r\n"; // ---------------------------------------------- ?>





 

... mehr Infos zur Delicious API siehe auch: delicious.com/developers





 










|   Home   |   Info   |   Backlink   |   Impressum   |


Valid XHTML 1.0 Transitional      CSS ist valide!

Screenshots:
FreeThumbshots by M-Software.de



zurück nach oben
TOP
auf dieser Seite