示例#1
0
        private async Task <APIGatewayProxyResponse> Subscribe()
        {
            var subscriptionModel = JsonConvert.DeserializeObject <SubscriptionModel>(Request.Body);

            return(GetAPIGatewayResponse(HttpStatusCode.Created,
                                         await ApiGatewayManager.Subscribe(subscriptionModel)));
        }
 private async Task <APIGatewayProxyResponse> Get() =>
 GetAPIGatewayResponse(HttpStatusCode.OK,
                       await ApiGatewayManager.Get(Request.QueryStringParameters["id"]));
 private async Task <APIGatewayProxyResponse> GetAll() =>
 GetAPIGatewayResponse(HttpStatusCode.OK, await ApiGatewayManager.GetAll());
示例#4
0
 private async Task <APIGatewayProxyResponse> Put() =>
 GetAPIGatewayResponse(HttpStatusCode.NoContent,
                       await ApiGatewayManager.Put(Request.QueryStringParameters["something"]));
 private async Task <APIGatewayProxyResponse> GetUsage() =>
 GetAPIGatewayResponse(HttpStatusCode.OK,
                       await ApiGatewayManager.GetUsage(Request.QueryStringParameters["keyId"],
                                                        Request.QueryStringParameters["usagePlanId"]));
 private async Task <APIGatewayProxyResponse> GetSdk() =>
 GetAPIGatewayResponse(HttpStatusCode.OK,
                       await ApiGatewayManager.GetSdk(Request.QueryStringParameters["apiId"],
                                                      Request.QueryStringParameters["stage"], Request.QueryStringParameters["sdkType"]));
 private async Task <APIGatewayProxyResponse> GetSwagger() =>
 GetAPIGatewayResponse(HttpStatusCode.OK,
                       await ApiGatewayManager.GetOpenApi(Request.QueryStringParameters["apiId"],
                                                          Request.QueryStringParameters["stage"], "swagger"));