Gluestick PHP library

7 views
Skip to first unread message

Justin

unread,
May 19, 2009, 5:55:57 AM5/19/09
to glue-development
Gluestick is a minimalist PHP library for interfacing with the Glue
API, it's only 43 sloc and using it couldn't be more simple.

Here's an example, looking up the Neverending Story with object/get:

$glue = new Glue('username', 'password');
$response = $glue->object->get(array(
'objectId' => 'http://en.wikipedia.org/wiki/
The_Neverending_Story',
));

And then $response contains the XML response.

Here's the project page: http://github.com/jdp/gluestick/tree/master
And direct download: http://github.com/jdp/gluestick/zipball/master

Let me know if you find any bugs :)

Thanks
Justin

Justin

unread,
May 20, 2009, 3:27:37 AM5/20/09
to glue-development
Gluestick is now also a Ruby gem. You can install the gem from Github.
The PHP version is still available from the php branch, and it's
linked to in the readme.

Pierre

unread,
May 27, 2009, 1:48:52 PM5/27/09
to glue-development
@justin, very nice !
I love httparty, great choice.

thanks

Dominick D'Aniello

unread,
May 27, 2009, 2:30:24 PM5/27/09
to glue-dev...@googlegroups.com
Yeah, totally awesome! Can't wait to see it used in an app!

- -
Dominick D'Aniello
Software Engineer - AdaptiveBlue
www.getglue.com
www.adaptiveblue.com

Swift

unread,
Jun 8, 2009, 3:10:03 PM6/8/09
to glue-development
So I think I may have stumbled across a bug. When you make the call to
something like:

$response = $glue->object->get(array(
'objectId' => 'http://en.wikipedia.org/wiki/
The_Neverending_Story',
));

PHP registers the word "object" as a reserved word and returns an
error. Any thoughts on a workaround? Or am I doing this wrong?

cheers,
Mike

Justin Poliey

unread,
Jun 9, 2009, 12:30:47 AM6/9/09
to glue-development
Hi Mike,

I just tested that exact code, and it works fine. Maybe it's a version
issue? What version of PHP are you using? The test version is 5.2.6.
As a last resort you could use literals, like this:

$response = $glue->{'object'}->get(array(
'objectId' => 'http://en.wikipedia.org/wiki/The_Neverending_Story'
));

Not as good-looking though.

Justin

Mike Rutgers

unread,
Jun 9, 2009, 11:03:05 AM6/9/09
to glue-dev...@googlegroups.com
Hey Justin,

I fixed the issue. I attempted a custom PHP build with my host but I messed it up somehow. Anyways, everything is back to normal now. Thanks for the help.

cheers,
Mike

swifter.vcf
Reply all
Reply to author
Forward
0 new messages