Changes

Jump to navigation Jump to search
Added what i have currently implemented (YAY! Documentation)
Line 8: Line 8:     
Current URL: [http://wiibrew.gtaero.net/ wiibrew.gtaero.net]
 
Current URL: [http://wiibrew.gtaero.net/ wiibrew.gtaero.net]
 +
 +
== Current (working) Implementation ==
 +
=== Vocabulary ===
 +
{| class="wikitable" style="margin-left:auto; margin-right:auto; width:100%; text-align:center;
 +
|-
 +
! Term
 +
! Definition
 +
|-
 +
| <nowiki>{API_KEY}</nowiki>
 +
| The "Key" that your program is given to connect to the WAPI system
 +
|-
 +
| Secret
 +
| A word or combonation of words of your own choosing that is encrypted and sent after the initial connection to verify your program.  DO NOT SHARE YOUR SECRET WITH ANYONE! (keep it in a '''secret.h''' and exclude it from the source code)
 +
|-
 +
| <nowiki>{SECRET_ENCRYPTION_TYPE}</nowiki>
 +
| Only sent upon the initial connection request, this tells you how you are supposed to send your secret.  You should encrypt it with the following type requested before sending for the next step:
 +
* 0 - MD5
 +
* 1 - SHA-1
 +
|-
 +
| <nowiki>{SESSION_ID}</nowiki>
 +
| An integer that should be received by your program on the initial connection and sent back with each query.  This allows us to remember you.
 +
|-
 +
| <nowiki>Generic MySQL Error</nowiki>
 +
| Not as "Generic" as we lead you to believe.  This actually sends in the following format:<pre><nowiki><?xml version="1.0" encoding="utf-8"?>
 +
<wapi><error no="SQL-{INT}">{SQL_ERROR}</error></wapi></nowiki></pre>
 +
Whenever you get one of these, it's best to tell us.  Its generally a bad thing.
 +
|-
 +
|}
 +
=== Step 1: Request Connection ===
 +
 +
When you start accessing the WAPI system, the first step is to '''Request a Connection'''.  This is done by querying the Connection script using your API Key.  The script will then return the encryption type (in numerical format) as well as your session ID for the following interactions between the program and the WAPI server.
 +
 +
==== Request ====
 +
<pre>
 +
http://wiibrew.gtaero.net/api/rcon.php
 +
?key={API_KEY}
 +
</pre>
 +
==== Return (good) ====
 +
<pre><nowiki><?xml version="1.0" encoding="utf-8"?>
 +
<wapi><settings><secret encryption="{SECRET_ENCRYPTION_TYPE}" /><session id="{SESSION_ID}" /></settings></wapi></nowiki></pre>
 +
 +
==== Return (bad) ====
 +
<pre><nowiki><?xml version="1.0" encoding="utf-8"?>
 +
<wapi><error no="WAPI-1">You attempted to use an invalid key.</error></wapi></nowiki></pre>
 +
or a '''Generic MySQL Error'''
 +
    
== Personal Ideas ==
 
== Personal Ideas ==
287

edits

Navigation menu