PHP code example of ronaldcastillo / feedly-api

1. Go to this page and download the library: Download ronaldcastillo/feedly-api library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

ronaldcastillo / feedly-api example snippets


$sandbox=FALSE;
$storeAccessTokenToSession=TRUE;

$feedly = new Feedly($sandbox, $storeAccessTokenToSession);


    $profile = $feedly->getEndpoint('Profile');

    var_dump($profile->fetch());

    $profile->setOptions(array(
        'email'=>'[email protected]'
    ));

    $profile->persist();


    $categories = $feedly->getEndpoint('Categories');

    var_dump($categories->fetch());

    $categories->changeLabel($id, 'New Label');

    $categories->delete($id);


    $entries = $feedly->getEndpoint('Entries');

    var_dump($entries->get($id));



    $streams = $feedly->getEndpoint('Streams');
    
    //Retrieve ids from stream 
    var_dump($stream->get($id,"ids"));
    
    //Retrieve contents from stream 
    var_dump($stream->get($id,"contents"));



    $markers = $feedly->getEndpoint('Markers');

    var_dump($markers->get($id));

    var_dump($markers->getUnreadCount());

    $markers->markArticleAsRead(array(
        'TSxGHgRh4oAiHxRU9TgPrpYvYVBPjipkmUVSHGYCTY0=_14499073085:c034:d32dab1f',
        'TSxGHgRh4oAiHxRU9TgPrpYvYVBPjipkmUVSHGYCTY0=_1449255d60a:22c3491:9c6d71ab'
    ));

    $markers->markArticleAsUnread(array(
        'TSxGHgRh4oAiHxRU9TgPrpYvYVBPjipkmUVSHGYCTY0=_14499073085:c034:d32dab1f',
        'TSxGHgRh4oAiHxRU9TgPrpYvYVBPjipkmUVSHGYCTY0=_1449255d60a:22c3491:9c6d71ab'
    ));

    $markers->markFeedAsUnread(array(
        'feed/http://feeds.feedburner.com/design-milk'
    ));

    $markers->markFeedAsUnread(array(
        'user/c805fcbf-3acf-4302-a97e-d82f9d7c897f/category/design',
        'user/c805fcbf-3acf-4302-a97e-d82f9d7c897f/category/photography'
    ));