I have been involved in a whole bunch of projects, both professionally and personally, which require interacting with third party APIs by calling web service endpoints.

I had to do this a lot, and essentially I found myself cutting and pasting the same bits of code about from project to project. This is obviously bad, so I took the time one morning to wrap up the code into a reusable library, and as a good open source citizen, I stuck it on Github.

Example usage

The library lets you specify an web service object, and bind it to an endpoint. You can then talk to this object and get various PHP data structures back.

Currently I’ve only written a JSON endpoint object, but it’d be easy enough to define classes to handle other formats.

e.g.

require_once('Webservice.php');
require_once('JSONWebservice.php');

$json = new \simple_webservice\JSONWebservice('https://example.com/rest/');

$result = $json->get('path/to/query', ['param1' => 'foo', 'param2' => 'bar']);

Enjoy!

» Visit the project on Github...

class-act Gist is a handy tool that allows you to save version controlled short snippets of code, and even cooler, to embed that code elsewhere.

Idno will automatically display embed code for certain links (images and youtube videos for example), so I thought it’d be cool if you could do this with gist links as well.

So I wrote a plugin. Enjoy!

» Visit the project on Github…

For me, a handy bit of functionality I needed for my Idno powered personal lifestream site, is the ability to make posts via email.

Idno has a powerful mobile view, but sometimes even that is too bandwidth intensive, and quite often I like to be able to fire and forget; use the native apps on my phone or laptop that better handle disconnection.

So, I put together a quick plugin that allows you to make posts via email!

How it works

The plugin, once installed and configured, will let you generate a secret email address to which you send your email.

Out of the box the plugin will allow you to make status updates, long form posts (where the length of the subject and message body exceeds 140 characters), and even upload photos, and you can extend it further in your own plugins!

Installation

Installation requires you to have access to your own mail server (which if you’re a good indieweb / prism-breaking citizen you should be). You create an email alias that will pipe the email through a incoming email script, and then configure your email server to direct email to this handler for your domain.

The repository readme has some more detailed instruction (and of course there are many other techniques for firing email through the script).

» Visit the project on Github…