-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
24 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |