Advertisement
Masadow

BelugaApi

Mar 13th, 2014
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Haxe 0.46 KB | None | 0 0
  1. package beluga.core.api;
  2.  
  3. import haxe.web.Dispatch;
  4.  
  5. class BelugaApi implements IAPI
  6. {
  7.     private var beluga : Beluga;
  8.  
  9.     public function new(beluga : Beluga) {
  10.         this.beluga = beluga;
  11.     }
  12.  
  13.     //Handle url like www.beluga.fr?trigger=login
  14.     public function doDefault(d : Dispatch) {
  15.         Sys.print("Welcome !");
  16.     }
  17.    
  18.     /*
  19.      * Modules API are generated like:
  20.          * public function doModule(d : Dispatch) {
  21.             * d.dispatch(new ModuleAPI(beluga));
  22.          * }
  23.      */
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement