2017 © Pedro Peláez
 

library hubspot-rss-parser

Parsing HubSpot rss-feed and turning it into Array of PHP objects

image

suomato/hubspot-rss-parser

Parsing HubSpot rss-feed and turning it into Array of PHP objects

  • Saturday, July 14, 2018
  • by suomato
  • Repository
  • 1 Watchers
  • 0 Stars
  • 2 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

HubSpot rss-feed Parser

This library is for parsing HubSpot rss-feed to PHP Object., (*1)

Installation

composer require suomato/hubspot-rss-parser

Example

// HubSpot blog RSS feed URL
$rss_feed = 'path/to/rss.xml'

$parser = new Suomato\HubspotParser($rss_feed);

// Array of HubspotPost objects
$posts = $parser->get();

// The First Post Title
$posts[0]->title;

// The First Post link
$posts[0]->link;

// The First Post Image Source
$posts[0]->image['src'];

// The First Post Image alt text
$posts[0]->image['alt'];

// Array of Categories of the First Post
$posts[0]->categories;

Filtering Posts

Include

// Only get posts with categories 'foo' OR 'bar'
$posts = $parser->get([
  'include' => ['foo', 'bar']
]);

Exclude

// Only get posts without categories 'foo' OR 'bar'
$posts = $parser->get([
  'exclude' => ['foo', 'bar']
]);

Limit

// Only get first three posts
$posts = $parser->get([
  'limit' => 3
]);

Offset

// Skips first three posts
$posts = $parser->get([
  'offset' => 3
]);

The Versions

14/07 2018

dev-master

9999999-dev

Parsing HubSpot rss-feed and turning it into Array of PHP objects

  Sources   Download

MIT

The Requires

  • php ^7.0

 

The Development Requires

by Toni Suomalainen

parser hubspot rss-feed

14/07 2018

v0.1.0

0.1.0.0

Parsing HubSpot rss-feed and turning it into Array of PHP objects

  Sources   Download

MIT

The Requires

  • php ^7.0

 

The Development Requires

by Toni Suomalainen

parser hubspot rss-feed

14/07 2018

v1.0.0

1.0.0.0

Parsing HubSpot rss-feed and turning it into Array of PHP objects

  Sources   Download

MIT

The Requires

  • php ^7.0

 

The Development Requires

by Toni Suomalainen

parser hubspot rss-feed