Skip to content
Browse files

Updated Readme with Usage example.

  • Loading branch information...
1 parent a030749 commit 487a59dd3bbcb79978236a5f2bcff4a78f983476 @geerlingguy geerlingguy committed Aug 10, 2012
Showing with 18 additions and 2 deletions.
  1. +18 −2 README.md
View
20 README.md
@@ -4,6 +4,22 @@
The Flocknote SDK for PHP allows easy interaction with the Flocknote API for PHP-based applications and websites.
-# Documentation
+# Usage
-Documentation for the Flocknote SDK for PHP can be found on the Flocknote website: [Flocknote API Documentation](http://www.flocknote.com/help/api).
+To use the Flocknote class in your PHP project, simply include the flocknote.php file in this repository, and create a new Flocknote instance with your app's ID and authentication key. For example:
+
+ <?php
+ include_once('flocknote.php');
+ if ($flocknote = new Flocknote(MY_APP_NAME, MY_APP_KEY)) {
+ // Set the username and password for this request.
+ $flocknote->setUserCredentials(USERNAME, PASSWORD);
+ // Get a note with ID 123.
+ $note = $flocknote->getNote(123);
+ }
+ ?>
+
+Most API objects and methods are implemented in this class; you can read through the thorough documentation for each method in the Flocknote class by reading through flocknote.php. More examples of SDK usage can be found in Flocknote's API documentation pages.
+
+# API Documentation
+
+Documentation for the Flocknote API can be found on the Flocknote website: [Flocknote API Documentation](http://www.flocknote.com/help/api).

0 comments on commit 487a59d

Please sign in to comment.
Something went wrong with that request. Please try again.