2017 © Pedro Peláez
 

library medium

A PHP library for reading the latest posts from a Medium.com feed

image

kaicmueller/medium

A PHP library for reading the latest posts from a Medium.com feed

  • Thursday, February 16, 2017
  • by KaiCMueller
  • Repository
  • 1 Watchers
  • 0 Stars
  • 15 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

Build Status, (*1)

A PHP library for reading the latest posts from a Medium.com feed, (*2)

I built this library for showing my latest Medium posts on my web profile. As this might be interesting to others, I provide it to the public. This library is currently under development and has a limited feature set. Feel free to contact me for any bugs or contributions., (*3)

Current features:

  • Get up to ten latest Medium posts with title, preview text, url, date and tags
  • Built in file cache and possibility to inject own cache

Usage


$medium = new \KaiCMueller\Medium\Medium( [ 'user' => '@yourUsername', 'cacheTime' => 600, // an optional cache lifetime 'useFileCache' => false, // de-/activate the optional build in file cache 'fileCachePath' => '/path/to/cacheFile' // optional file path for internal file cache ], $cache // optional parameter to inject own cache class implementing \KaiCMueller\Medium\Cache\CacheInterface ); foreach ($medium->getPosts() as $post) { echo $post->getTitle(); }

Install

The recommended way to install is through Composer., (*4)

# Install Composer
curl -sS https://getcomposer.org/installer | php

In your composer.json file add the following requirement, (*5)

"require": {
    "kaicmueller/medium": "~1.0"
}

After installing, you need to require Composer's autoloader:, (*6)

require 'vendor/autoload.php';

You can then later update using composer:, (*7)

bash composer.phar update, (*8)

Versions

  • 2.0.0 - Post date now is DateTime object
  • 1.0.1 - Adjusting Readme for correct versioning
  • 1.0.0 - First release version

The Versions

16/02 2017

dev-master

9999999-dev

A PHP library for reading the latest posts from a Medium.com feed

  Sources   Download

MIT

The Requires

 

The Development Requires

medium

16/02 2017

v2.0.0

2.0.0.0

A PHP library for reading the latest posts from a Medium.com feed

  Sources   Download

MIT

The Requires

 

The Development Requires

medium

05/02 2017

v1.0.1

1.0.1.0

A PHP library for reading the latest posts from a Medium.com feed

  Sources   Download

MIT

The Requires

 

The Development Requires

medium

05/02 2017

v1.0.0

1.0.0.0

A PHP library for reading the latest posts from a Medium.com feed

  Sources   Download

MIT

The Requires

 

The Development Requires

medium