• Stars
    star
    122
  • Rank 286,367 (Top 6 %)
  • Language
    PHP
  • License
    MIT License
  • Created over 10 years ago
  • Updated over 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

PHP wrapper around Feedly's REST API

feedly-api

PHP wrapper around Feedly's REST API.

Build Status

Notes

Check the examples before anything.

If you are working in Sandbox mode of Feedly's API you should know a couple of things.

  • Your Client's ID, secret must taken from here, which is updated very often so be sure to check it once in while.
  • While in Sandbox mode, only "http://localhost" is permited for callback url. So leave it as is and just replace it every time with your domain, if it's different. You can also add you own to permitted domains here.
  • Once you've done developing you can contact Feedly and ask them to put you on production.

Installation

Add this to your composer.json

"require": {
        "kbariotis/feedly-api": "dev-master"
    }

Or download the ZIP.

Documentation

Constructor:

$feedly = new Feedly(Mode $mode, AccessTokenStorage $accessTokenStorage);

The Mode determines if you want to use the Sandbox mode (SandBoxMode class) or standard one (DeveloperMode class).

The AccessTokenStorage determines where the information about token should be stored. In example in session, file or database.

***Sandbox Example

$feedly = new Feedly(new feedly\Mode\SandBoxMode(), new feedly\AccessTokenStorage\AccessTokenSessionStorage());

***Standard Mode Example

$feedly = new Feedly(new feedly\Mode\DeveloperMode(), new feedly\AccessTokenStorage\AccessTokenSessionStorage());

Authentication:

Check the example.

Note that not every Feedly action needs authentication. Passing a token is optional.

Endpoints

Profile:

    $profile = $feedly->profile();

    var_dump($profile->fetch());

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

    $profile->persist();

Categories:

    $categories = $feedly->categories();

    var_dump($categories->fetch());

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

    $categories->delete($id);

Entries:

    $entries = $feedly->entries();

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

Streams:

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

Markers:

    $markers = $feedly->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'
    ));

Contribute

  • Create a branch
  • Add your models here
  • Run tests with phpunit
  • Make a Pull Request

Licence

The MIT License (MIT)

Copyright (c) 2014 Konstantinos Bariotis

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

More Repositories

1

templates

A set of standard document templates.
2,010
star
2

throw.js

HTTP Error collection to use in your next REST API.
TypeScript
274
star
3

documer

Bayes algorithm implementation with PHP
PHP
77
star
4

ansible-nodejs-digitalocean

Complete playbook to create and deploy a Node.js application on Digital Ocean.
Jinja
75
star
5

kostasbariotis.com

My Gatsby.js powered personal homepage
JavaScript
65
star
6

yeelight.js

Control your Yeelight devices with Node.js
JavaScript
29
star
7

node-cron-expression

Declarative functional cron expression builder
TypeScript
26
star
8

presentador

πŸ“½ An opinionated presentation framework. Just write what you want to present and it will do the rest.
JavaScript
25
star
9

can-i

Authorization service for a Microservices Architecture
JavaScript
23
star
10

gityeller

Stay in the loop of your favorite Github repositories.
JavaScript
20
star
11

webpack-patterns

A list of common webpack patterns
JavaScript
14
star
12

meanimum

Meanimum is my Mongo/Express/Angular/Node Boilerplate
JavaScript
13
star
13

gatsby-tutorial

Source code for the tutorial
JavaScript
12
star
14

simple-static-site-generator

Just render some HTML already!
JavaScript
9
star
15

sqs-lambda-consumer

Create a sequential pipeline of processing messages with AWS SQS and Lambda.
JavaScript
8
star
16

typescript-graphql-server

A simple Graphql server with TypeScript
TypeScript
8
star
17

gatsby-plugin-paginate

Plug and play pagination plugin for Gatsby
JavaScript
8
star
18

quoteme.js_Unmaintained_

Medium-like, Share to Twitter popup button on text selection
JavaScript
8
star
19

go-discover

Discover what your peers are doing in GitHub
Go
7
star
20

parcel-bootstrap-pug

Playing around with Parcel and Bootstrap
JavaScript
6
star
21

KBariotis_NBP

National Bank of Greece as a Payment Gateway for Magento
PHP
5
star
22

Dijkstrer

Dijkstrer is a C application which calculate the shor path of a graph using Dijkstra's Algorithm. Dijkstrer uses MPI library to implement cluster functionality where every member of the cluster calculates each of a node's childs. Dijkstrer will use each process to calculate each child of every node. See README file for more info.
C
5
star
23

wsmanager

An easy to use WebSocket account manager
JavaScript
5
star
24

kostasbariotis.com__ghost-theme

This is my Ghost's theme for http://kostasbariotis.com
CSS
4
star
25

devastation-podcast

Devastation Podcast - Talking about dev in Greek
HTML
4
star
26

chrome-guides

Chrome Extension for Photoshop-like Guides
JavaScript
3
star
27

async-jobs-ui

UI to monitor async jobs and processes.
JavaScript
3
star
28

nodejs-mongo-geospatial-queries

MongoDB Geospatial Queries PoC with Node.js
JavaScript
3
star
29

aws-static-site

🐣 Deploy a static site to AWS, made easy
JavaScript
2
star
30

static-woocommerce-frontend

CSS
2
star
31

gridorous

CSS grid exposed as a function to be used in CSS Modules
JavaScript
2
star
32

acdev

JavaScript
1
star
33

bestbeachesin.gr

HTML
1
star
34

covid-19-stats

1
star
35

KBariotis_ProductFeeds

Add Product Feeds to your store for http://skroutz.gr, http://bestprice.gr, http://snif.gr
PHP
1
star
36

dotfiles

Shell
1
star
37

example

JavaScript
1
star
38

slackzones.com

Generate timezones heat maps from your Slack channels
JavaScript
1
star
39

git-workshop

HTML
1
star
40

mailgunee

Preview your emails sent through mailgun
JavaScript
1
star
41

phpless

PHP Less Assets Management
PHP
1
star
42

HTTPHeaderElucidator

HTTP Headers behavior for humans
JavaScript
1
star
43

api-platform

Build hypermedia and GraphQL APIs in minutes, generate Progressive Web Apps to consume them.
JavaScript
1
star
44

braintree_node

Braintree Node.js library
JavaScript
1
star
45

dependency-land

Find the npm modules that depend on a specific module and semver range.
JavaScript
1
star