You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
60 lines
1.4 KiB
PHP
60 lines
1.4 KiB
PHP
<?php
|
|
|
|
/*
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
*/
|
|
|
|
$keyregex = "/[a-z0-9]{64}/";
|
|
|
|
$APIS = [
|
|
"ping" => [
|
|
"load" => "ping.php",
|
|
"vars" => [
|
|
]
|
|
],
|
|
"signup" => [
|
|
"load" => "addaccount.php",
|
|
"vars" => [
|
|
"username" => "string",
|
|
"password" => "string",
|
|
"accttype" => "/(giver|receiver)/"
|
|
]
|
|
],
|
|
"getkey" => [
|
|
"load" => "getkey.php",
|
|
"vars" => [
|
|
"OR user" => [
|
|
"username" => "/[a-zA-Z0-9]+/",
|
|
"email" => "/.+/",
|
|
"phone" => "/[0-9]{10,}/"
|
|
],
|
|
"OR pass" => [
|
|
"password (optional)" => "string",
|
|
"pin (optional)" => "/[0-9]{4,10}"
|
|
]
|
|
]
|
|
],
|
|
"checkkey" => [
|
|
"load" => "checkkey.php",
|
|
"vars" => [
|
|
"key" => $keyregex
|
|
]
|
|
],
|
|
"checkbalance" => [
|
|
"load" => "balance.php",
|
|
"vars" => [
|
|
"key" => $keyregex
|
|
]
|
|
],
|
|
"sendmoney" => [
|
|
"load" => "send.php",
|
|
"vars" => [
|
|
"key" => $keyregex,
|
|
"to" => "/[0-9a-z]+/",
|
|
"amount" => "/[0-9]{1,4}(\.[0-9]{2})?/"
|
|
]
|
|
]
|
|
];
|