using System.Collections.Generic;
using System.Net;
using System.Net.Http;
using Microsoft.Azure.Functions.Worker;
using Microsoft.Azure.Functions.Worker.Http;
using TEAMModelOS.SDK.DI;
namespace TEAMModelOS.FunctionV4.HttpTrigger
{
public class BIHttpTrigger
{
private readonly AzureCosmosFactory _azureCosmos;
private readonly DingDing _dingDing;
private readonly AzureStorageFactory _azureStorage;
private readonly AzureRedisFactory _azureRedis;
private readonly HttpClient _httpClient;
public BIHttpTrigger(AzureCosmosFactory azureCosmos, DingDing dingDing, AzureStorageFactory azureStorage, AzureRedisFactory azureRedis, HttpClient httpClient)
{
_azureCosmos = azureCosmos;
_dingDing = dingDing;
_azureStorage = azureStorage;
_azureRedis = azureRedis;
_httpClient = httpClient;
}
///
/// 统计学校的信息
///
///
///
[Function("stats-sc-info")]
public HttpResponseData StatsSchoolInfo([HttpTrigger(AuthorizationLevel.Function, "get", Route = null)] HttpRequestData req)
{
var response = req.CreateResponse(HttpStatusCode.OK);
response.Headers.Add("Content-Type", "text/plain; charset=utf-8");
response.WriteString("Welcome to Azure Functions!");
return response;
}
}
}