Existing Users

Documentation

PHP Client Package / Methods

Introduction

These are all methods of the Services_BitsyBox class. You must first instantiate a class before you can use any of these methods.

$bb = new Services_BitsyBox($ApiKey,$ApiSecret);

Method: getPages

Returns all pages for a given site

Calling

array getPages( array $args )

Arguments

  • int ttl - Timeout in seconds for the cache

Return Type

Array of Module Objects (Services_BistyBox_Module)

Example

$pages = $bb->getPages( array( 'ttl' => 300 ) );

Method: getPage

Returns a single page for a given site

Calling

object getPage( array $args )

Arguments

  • int id - Id of the Page requesting
  • string key - KeyId of the Page requesting

Return Type

Module Object (Services_BistyBox_Module)

Example

$page = $bb->getPage( array( 'id' => 9 ) );

Method: getModules

Returns a list of modules

Calling

array getModules( array $args )

Arguments

  • array modules - array of module information
  • int id - module id
  • string key - module keyId
  • int ttl - Cache timeout in seconds

Return Type

Array of Module Object (Services_BistyBox_Module)

Example

$modules = $bb->getModules( array( 'modules' => array( array('id' => 9), array('id' => 10 ) ), 'ttl' => 300 ) );

Method: getModule

Returns a single module

Calling

object getModule( array $args )

Arguments

  • int id - Id of Module
  • string key - KeyId of the Module

Return Type

Module Object (Services_BistyBox_Module)

Example

$module = $bb->getModule( array( 'id' => 9 ) );

Method: getItem

Returns a single Item from a module

Calling

object getItem( array $args )

Arguments

  • int id - Id of the item
  • string key - KeyId of the item

Return Type

Item Object (Services_BistyBox_Item)

Example

$item = $bb->getItem( array( 'id' => 9 ) );

Method: getItems

Returns a list of items

Calling

array getItems( array $args )

Arguments

  • array items - array of item information
  • int id - Id of item
  • string key - KeyId of item

Return Type

Item Object (Services_BistyBox_Item)

Example

$items = $bb->getItems( array( 'items' => array( array('id' => 9 ) ) ) );

Method: dumpCache

Removes the entire site cache

Calling

dumpCache()

Arguments

  • None

Return Type

bool (true / false)

Example

$bb->dumpCache();

About BitsyBox

BitsyBox is a hosted content storage platform that offers two products that work in perfect harmony. The first is an easy-to-use web interface that lets site owners edit and update their content. The second is a robust API for developers to quickly access that content from their website or application code.

Resources

We've fully documented BitsyBox to make it easy -- so easy in fact, we guarantee you can integrate a new or existing website in just a few minutes. More Support

Screencasts

Check out our library of streaming videos, professionally produced to help guide you through your integration with BitsyBox.
View Screencasts

© Copyright 2009 BitsyBox LLC - Terms of Service - Privacy - Service Status