favon.12hp.de

    • Über
    • TAGs
    • RSS
    • API
    • Home

    API - Application Programming Interface

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

    Beispiel: Example
     

    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)

    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

     





     

    Information


    Bookmark-Verzeichnis
    Favoriten-Sammlung
    mit do-follow Links

    favon.12hp.de



    * * *

     









    |   Home   |   Info   |   Nutzungsbedingungen   |   Backlink   |   Impressum   |


    Valid XHTML 1.0 Transitional      CSS ist valide!




    zurück nach oben
    TOP
    auf dieser Seite