public void OnGet() { Options = _options.Value; var response = _apiManager.GetAll(); if (!response.IsError) { Apis = response.Data; } }
public async Task <IList <ApiModel> > Get(string serviceId) { try { if (!string.IsNullOrEmpty(serviceId)) { return(await _manager.GetByService(ApiKey, serviceId)); } else { return(await _manager.GetAll(ApiKey)); } } catch (ApiGatewayException e) { if (e.ErrorCode == HttpStatusCode.NotFound) { Response.StatusCode = (int)e.ErrorCode; } } return(null); }