paspartout-api

An abstraction layer for the Paspartout API.

Installation

Use RubyGems to install paspartout-api to get started:

            $ gem install paspartout-api

Initialization

Use the API key of the Paspartout site, found in the settings panel, to establish the connection:

            @paspartout = Paspartout.new('ppt-247400')

Pulling data

Get the site data:

            @site = @paspartout.site

Get pages in menu:

            @pages = @paspartout.pages

Get a particular page including children or blocks:

            @page = @paspartout.page(123)

This also works with the permaname:

            @page = @paspartout.page('page-permaname')

There are some comvenience methods:

            @portfolio = @paspartout.portfolio
            @blog = @paspartout.blog
            @shop = @paspartout.shop
            @about = @paspartout.about

Contributing to paspartout-api

Copyright © 2014 Wout Fierens. See LICENSE.txt for further details.