Editing Getting Started with CLOT

Jump to: navigation, search

Warning: You are not logged in.

Your IP address will be recorded in this page's edit history.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 34: Line 34:
  
 
That's it!  You're up and running.  Now you can play around with the website, crack open the code, and figure out how it all works.
 
That's it!  You're up and running.  Now you can play around with the website, crack open the code, and figure out how it all works.
 
== Using Test Mode ==
 
 
If you look in api.py, there’s a line that says TestMode = False. By changing this to True, you’ll enable test mode which allows you to test your app offline using fake data.
 
 
In test mode, the app won’t hit warzone.com APIs at all, and instead when the code tries to call an API, it will return fake data. This is useful while building your app since you can easily simulate players signing up and see how games get created with them. You can do things like simulate 500 players signing up to your tournament, which would be very time consuming to do by hand.
 
 
There's also a page, at '''/test''' that helps invoke your code. This page is only accessible while TestMode is True.  To access it, just visit /test/<lotid>.  The easiest way to get there is to visit a lot in your browser, and change your browser's url from '''/lot/1234567''' to '''/test/1234567'''.
 
 
When you’ve got everything working perfectly, all you have to do is set TestMode back to False and release!
 
 
== Setting up Authentication ==
 
 
The CLOT framework uses the [[CLOT Authentication]] system to ensure that players are who they say they are.  By using this system, it ensures that players can only join or leave the CLOT themselves and can't, say, remove other people from a ladder.
 
 
To set this up, it requires two additional configuration changes.
 
 
# While logged into your main Warzone account, visit https://www.warzone.com/CLOT/Config.  In the CLOT Redirect URL field, insert a path to your CLOT's '''login''' page.  For example, http://clot-test.appspot.com/login
 
# At the bottom of this same page, the site will tell you your CLOT Authentication URL.  At the end of this URL is a number (the "p" parameter) that identifies your invite token.  You need to insert this number into your python code in two places: join.py and leave.py.
 
  
 
== Understanding the Code ==
 
== Understanding the Code ==

Please note that all contributions to Warzone Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see Warzone Wiki:Copyrights for details). Do not submit copyrighted work without permission!

Cancel | Editing help (opens in new window)
Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox