Skip to content

Commit

Permalink
Updated README
Browse files Browse the repository at this point in the history
  • Loading branch information
jdp committed May 19, 2009
1 parent 9e1243b commit e53d878
Showing 1 changed file with 24 additions and 4 deletions.
28 changes: 24 additions & 4 deletions README.markdown
Original file line number Diff line number Diff line change
@@ -1,6 +1,26 @@
Gluestick
---------
# Gluestick

Gluestick is a simple object-oriented implementation of the Glue API for PHP.
It takes advantage of PHP's magic methods to make a more intuitive interface for developers.
Rather than learning a new set of methods, you just use Glue's native methods.
It takes advantage of PHP's magic methods to make a more intuitive interface for developers:
rather than learning a new set of methods, you just use Glue's native methods.

## Get your construction paper out: A Tutorial

To get started, include the **glue.php** file and instantiate a Glue class.
Every method in the Glue API requires authentication, so you'll also need to use a valid username and password.

require 'glue.php';
$glue = new Glue('username', 'password');

To actually use methods, call the same ones you would as if you were calling them right through HTTP.
If you wanted to use the `user/friends` method, you would do this:

$friends = $glue->user->friends(array('userId'=>'jdp'));

See the correspondence? `$glue->user->friends` maps itself to `http://api.getglue.com/v1/user/friends`.

Query string parameters are passed through an array as the first argument.

## About

2009 [Justin Poliey](http://justinpoliey.com)

0 comments on commit e53d878

Please sign in to comment.