An experimental state machine for the Google+ Hangout API
License
MattSenter/Google-Plus-Hangout-API-State-Machine
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Google+ Hangout API State Machine This code is provided as-is with no warranty, expressed or implied. Use at your own risk. See the LICENSE file for information on the LGPL license. SUMMARY: This project was created to fill a gap in the Google+ Hangout API when it comes to managing shared state across multiple clients that may join or drop out of a running app in a hangout. The provided class, kungfuters.StateMachinePlus, attempts to manage local state when updates to the shared state occur. USAGE: There are a few things you'll need to do to use kungfuters.StateMachinePlus: 1) Instantiate the class with a custom setup() method that includes your transition definitions: var stateMachine = new kungfuters.StateMachinePlus({ setup: function() { this.addTransition("phase1", "phase2"); this.addTransition("phase2", "phase3"); } }); 2) Call the begin() method with your first phase: stateMachine.begin("phase1"); 3) Define your phase methods, which by default look like _phase_yourPhaseName(): function _phase_phase1() { ... } function _phase_phase2() { ... } 4) Also, if you want to scope your methods, just pass a "scope" parameter to the kungfuters.StateMachinePlus() constructor: new kungfuters.StateMachinePlus({ scope: someObject ... }); I'll be posting updates about this on Google+, and in case you have questions, just circle me. Find me at http://zipl.us/matt (Also get your own Google+ vanity URL and RSS Feed at http://zipl.us)
About
An experimental state machine for the Google+ Hangout API
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published