New SWX Backpack Service
I was lucky enough to catch Aral’s talk on SWX during this years Flash on the Beach conference in Brighton. Although already somewhat familiar with the project, his session inspired me to become active and develop a service which might be of use to some people.I wanted to choose a service which could have some potential in the mashup and mobile space so after some thinking I decided upon the Backpack service from 37Signals.
What is Backpack?
The aim of Backpack is to help you keep your life organised. Whether it’s an event you’re planning or some thoughts you’re collating, this online application allows you to assemble, edit and share these in a simple and flexible manner.
On top of this, Backpack also includes a reminders system which is capable of dispatching an email and/or a sms to the account holder at a predefined point in the future.
There are far to many ways Backpack can be used for me to go into here but for some ideas take a look at these examples.
Getting Started
You can jump right in by heading over to the public gateway (hopefully part of Aral’s one soon). There you will find the Backpack service along with a mock account if you don’t have one yourself. You are free use this to help you become familiar with the api and result sets. A good place to start is the ‘getAllPages’ method which will return the page id’s of all pages within an account and with a page id in hand you can then query a page for items such as notes, emails and lists. To take a look at the contents of an entire account then try the ‘exportBackpack’ method.
If you would like to host your own SWX Backpack service you will first need to download and install the SWX PHP Gateway and then download the latest version of the Backpack service through the link at the bottom of this section. You will notice that the download contains an updated version of the BaseService class. I am hopeful this will be integrated into the trunk of SWX soon, but until then you will need to replace your copy in the ’swx/php/’ directory with this one. For those interested, this update adds a ‘_xmlCall’ method which uses SWXml to translate the xml result of an api call to object form. It adds SSL fall back support if cURL is not installed but OpenSSL is, and finally it allows you to add custom headers to a requests.
In order for this service to function correctly you will also need Flo’s SWXml service. This should be integrated into the SWX Gateway download at some point, but if it’s not present then you can download it from here. Simply place his service class alongside the Backpack class inside the ’swx/php/services/’ directory and you’re set!
Download SWX Backpack Service (0.7.2) (.zip).
A Look at The API
So what kind of things can you do with this new SWX Service?
- Global Operations
- Get All Pages
- Get Pages With Tag
- Search All Pages
- Get Upcoming Reminders
- Export Backpack (Exports your entire account)
- Page Operations
- Create
- Update Title
- Duplicate
- Reorder Contents
- Get All Lists
- Get All Notes
- Get All Emails
- Share (with friends or the world)
- Unshare
- Email to Self
- Tag
- Destroy
- List Operations
- Create
- Update Title
- Get All List Items
- Destroy
- List Item Operations
- Create
- Update Label
- Reposition (up, down, top, bottom)
- Toggle Selected
- Destroy
- Note Operations
- Create
- Update Title and Body
- Destroy
- Email Operations
- Destroy
- [Every page has a unique email address which you can send emails to. This address can be found in the result of a ‘getPage’ request]
- Reminder Operations
- Create
- Update Time and Body
- Destroy
That’s all! If you do use this service in an application I would love to hear about it :)
About this entry
You’re currently reading “New SWX Backpack Service,” an entry on Mike Stead
- Published:
- 12.02.07 / 9pm
- Category:
- Web Services
Comments are closed
Comments are currently closed on this entry.