dummy help data
This commit is contained in:
@@ -47,7 +47,7 @@ $routes->post('/en/wrench/api/v1/authstart', 'WrenchOauth::apigate');
|
||||
|
||||
$routes->post('/en/wrench/api/v1/faq', 'WrenchFaq::apigate');
|
||||
$routes->post('/en/wrench/api/v1/faqdata', 'WrenchFaq::apigate');
|
||||
|
||||
$routes->post('/en/wrench/api/v1/helpdata', 'WrenchFaq::apiHelpData');
|
||||
|
||||
$routes->post('/en/wrench/api/v1/apigate', 'WrenchApi::apigate');
|
||||
$routes->post('/en/wrench/api/v1/generics', 'WrenchApi::apigate');
|
||||
|
||||
@@ -141,6 +141,42 @@ class WrenchFaq extends BaseController
|
||||
}
|
||||
|
||||
|
||||
public function helpgate(){
|
||||
return json_encode( $this->apiHelpData() );
|
||||
}
|
||||
private function apiHelpData() {
|
||||
|
||||
$total = 20;
|
||||
|
||||
$data = array(
|
||||
"status" => 100,
|
||||
"total_record" => ($total - 1),
|
||||
"internal_return" => 0,
|
||||
"result_list" => array(),
|
||||
);
|
||||
|
||||
|
||||
for ($i = 0; $i < $total; $i++) {
|
||||
$key = sprintf("%05d", $i);
|
||||
$msg='';
|
||||
$msgS = "<p> Random gibberish text to use in web pages, site templates and in typography demos.
|
||||
Get rid of Lorem Ipsum forever. A tool for web designers who want to save time. </p>";
|
||||
$txL = rand(1,5);
|
||||
for($ii=1; $ii<$txL; $ii++){
|
||||
$msg = $msg.$msgS;
|
||||
}
|
||||
|
||||
$data["result_list"][] = array(
|
||||
"uid" => $key,
|
||||
"public" => "1",
|
||||
"title" => "This is faq title dummy text ".$key,
|
||||
"vid" => (rand(0,1)> 1) ? "https://www.youtube.com/embed/xZ4o180KFNk?si=zGuIgpfTb-Tc0o3H":'',
|
||||
"msg" => $msg
|
||||
);
|
||||
}
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user