jwkent / AudioWebApp

An audio web app
2 stars 2 forks source link

There are four more API end points that need to be called to get all content. #29

Closed jwkent closed 4 months ago

jwkent commented 4 months ago

We need to create four new menu items besides Topical and Verse by Verse.

The keys to pass into the category parameter end-point:

See: AudioWebApp6\Server\Services\TnpWebService.cs file for how to add more methods to call these four more end-points. We will need to create four more corresponding components and reference them in the navigation component.

Three of the four new menu items only have one category. In these cases, the first category should be auto expanded.

jwkent commented 4 months ago

@benjkent Do you understand this priority issue and can hopefully can work on it ASAP.

jwkent commented 4 months ago

@benjkent I create a branch JKe/#29-Add-four-more-endpoints that you could work on. I'm reading the endpoints fine. There is one last thing. The Items value is null so if you could figure that out that would be good. C:\Repos\AudioWebApp\AudioWebApp6\Server\Models\Item.cs

  private static List<Item> GetData(string apiEndPoint)
  {
      var response = ServerName
          .AppendPathSegment(ApiAudioPath)
          .SetQueryParams(new { category = apiEndPoint })
          .GetJsonAsync<Data>();

      return response.Result.Results;
  }

The Christ end point is working, but the other three are not.

benjkent commented 4 months ago

I will check it out.

jwkent commented 4 months ago

Here are some files which were saved after calling the new end-points.

These are NOT being deserialized correctly:

These are being deserialized correctly:

jwkent commented 4 months ago

The sub items have no items array.

Image

jwkent commented 4 months ago

@benjkent Updated the code to correctly write out the CurrentData.xml file with all the correct links. Now all you have to do is write the UI part and read from the ApiService each of the new categories of audio files.

jwkent commented 4 months ago

The life of Christ category needs to be manually ordered as the sequence numbers are incorrect.

benjkent commented 4 months ago

Closing this issue.