コード例 #1
0
 protected function GetAdditionalParameters($app, $bSingle, $method)
 {
     $params = parent::GetAdditionalParameters($app, $bSingle, $method);
     if ($method == "GET") {
         $pWidth = new stdClass();
         $pWidth->paramType = "query";
         $pWidth->name = "width";
         $pWidth->type = "integer";
         $pWidth->required = false;
         $pWidth->description = "The width of the image";
         $pHeight = new stdClass();
         $pHeight->paramType = "query";
         $pHeight->name = "height";
         $pHeight->type = "integer";
         $pHeight->required = false;
         $pHeight->description = "The height of the image";
         $pDpi = new stdClass();
         $pDpi->paramType = "query";
         $pDpi->name = "dpi";
         $pDpi->type = "integer";
         $pDpi->required = false;
         $pDpi->description = "The dpi of the image";
         $pScale = new stdClass();
         $pScale->paramType = "query";
         $pScale->name = "scale";
         $pScale->type = "integer";
         $pScale->required = false;
         $pScale->description = "The scale of the image";
         array_push($params, $pWidth);
         array_push($params, $pHeight);
         array_push($params, $pDpi);
         array_push($params, $pScale);
     }
     return $params;
 }
コード例 #2
0
 protected function GetAdditionalParameters($app, $bSingle, $method)
 {
     $params = parent::GetAdditionalParameters($app, $bSingle, $method);
     if ($method == "POST") {
         $pPostBody = new stdClass();
         $pPostBody->paramType = "body";
         $pPostBody->name = "body";
         $pPostBody->type = "string";
         $pPostBody->required = true;
         $pPostBody->description = $app->localizer->getText("L_REST_POST_BODY_DESC");
         array_push($params, $pPostBody);
     } else {
         if ($method == "PUT") {
             $pPutBody = new stdClass();
             $pPutBody->paramType = "body";
             $pPutBody->name = "body";
             $pPutBody->type = "string";
             $pPutBody->required = true;
             $pPutBody->description = $app->localizer->getText("L_REST_PUT_BODY_DESC");
             array_push($params, $pPutBody);
         } else {
             if ($method == "DELETE") {
                 $pFilter = new stdClass();
                 $pFilter->paramType = "form";
                 $pFilter->name = "filter";
                 $pFilter->type = "string";
                 $pFilter->required = false;
                 $pFilter->description = $app->localizer->getText("L_REST_DELETE_FILTER_DESC");
                 array_push($params, $pFilter);
             }
         }
     }
     return $params;
 }