Beispiel #1
0
 public async Task <ActionResult <PartialImportedSongs> > GetImportSongs(string url, string pageToken, int maxResults = 20, bool parseAll = true)
 {
     try
     {
         return(await _queries.ImportSongs(url, pageToken, maxResults, parseAll));
     }
     catch (UnableToImportException x)
     {
         return(BadRequest(x.Message));
     }
 }
Beispiel #2
0
 public async Task <PartialImportedSongs> GetImportSongs(string url, string pageToken, int maxResults = 20, bool parseAll = true)
 {
     try {
         return(await queries.ImportSongs(url, pageToken, maxResults, parseAll));
     } catch (UnableToImportException x) {
         throw new HttpResponseException(new HttpResponseMessage(HttpStatusCode.BadRequest)
         {
             ReasonPhrase = x.Message
         });
     }
 }