2017 © Pedro Peláez
 

library medium-json-parser

Php parser for the Medium JSON API.

image

jaysalvat/medium-json-parser

Php parser for the Medium JSON API.

  • Monday, January 23, 2017
  • by jaysalvat
  • Repository
  • 1 Watchers
  • 3 Stars
  • 28 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 3 Versions
  • 8 % Grown

The README.md

Medium Json Parser

Latest Stable Version License, (*1)

This is a PHP parser for the Medium Json API., (*2)

Installation:

Create a composer.json file with:, (*3)

{
   "require": {
       "jaysalvat/medium-json-parser": "~1.0"
   }
}

Run Composer to install MediumJsonParser., (*4)

$ curl -sS https://getcomposer.org/installer | php
$ composer.phar install

Example:

$url = 'https://medium.com/@jaysalvat/my-title-99dcb55001b6';

$parser = new MediumJsonParser\Parser($url);

// Path to the iFrame proxy, see below
$parser->iframeProxyPath = 'iframe.php';

// Image compression
$parser->imageQuality = 80;

// Image max size
$parser->imageWidth = 2000;

$html = $parser->html([
    // Skip/keep the title and subtitle
    'skip_header'  => false,

    // HTML or Array of HTML
    'return_array' => false
]);

echo $html;

iFrame Proxy

To avoid CORS issues with iFrame, create a iframe.php proxy., (*5)

readfile('http://medium.com/media/' . $_GET['resource_id'] . '?postId=' . $_GET['post_id'] . '"');

The Versions

23/01 2017

1.1.1

1.1.1.0 https://github.com/jaysalvat/medium-json-parser

Php parser for the Medium JSON API.

  Sources   Download

MIT

The Requires

  • php >=5.6.0

 

api parser json medium

23/01 2017

dev-master

9999999-dev https://github.com/jaysalvat/medium-json-parser

Php parser for the Medium JSON API.

  Sources   Download

MIT

The Requires

  • php >=5.6.0

 

api parser json medium

23/01 2017

1.0.0

1.0.0.0 https://github.com/jaysalvat/medium-json-parser

Php parser for the Medium JSON API.

  Sources   Download

MIT

The Requires

  • php >=5.6.0

 

api parser json medium