using System; using System.Threading; using System.Threading.Tasks; using Company.Namespace.Models; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using Microsoft.Azure.WebJobs; using Microsoft.Azure.WebJobs.Extensions.Http; using Microsoft.Extensions.Logging; using System.Collections.Generic; namespace Company.Namespace { public class ArtistsApi { private ILogger _logger; /// Initializes a new instance of ArtistsApi. /// Class logger. /// is null. public ArtistsApi(ILogger logger) { if (logger == null) { throw new ArgumentNullException(nameof(logger)); } _logger = logger; } /// Returns a list of artists. /// Raw HTTP Request. /// The cancellation token provided on Function shutdown. [FunctionName("GetArtists_get")] public IActionResult GetArtists([HttpTrigger(AuthorizationLevel.Anonymous, "get", Route = "artists")] HttpRequest req) { _logger.LogInformation("HTTP trigger function processed a request."); // TODO: Handle Documented Responses. // Spec Defines: HTTP 200 // Spec Defines: HTTP 400 throw new NotImplementedException(); } /// Lets a user post a new artist. /// The Artist to use. /// Raw HTTP Request. /// The cancellation token provided on Function shutdown. /// is null. [FunctionName("GetArtists_get")] public IActionResult NewArtist([HttpTrigger(AuthorizationLevel.Anonymous, "post", Route = "artists")] Artist body, HttpRequest req) { _logger.LogInformation("HTTP trigger function processed a request."); // TODO: Handle Documented Responses. // Spec Defines: HTTP 200 // Spec Defines: HTTP 400 throw new NotImplementedException(); } } }