Skip to content
This repository has been archived by the owner on Oct 29, 2024. It is now read-only.

API: Improve Character Data output #512

Open
Ipstenu opened this issue Jul 1, 2024 · 0 comments
Open

API: Improve Character Data output #512

Ipstenu opened this issue Jul 1, 2024 · 0 comments

Comments

@Ipstenu
Copy link
Contributor

Ipstenu commented Jul 1, 2024

More and more people want to use the API (yay) but not all the data grew well with the api. This sort of data is not easy to collect:

  • character_name
  • sexuality
  • gender
  • roles (recurring, guest)
  • status (dead, alive)
  • date_death
  • tv_show
  • show_genre
  • air_dates

It's pretty easy to add in all except the last three as we save the TV show identifier by its post ID. But in theory it should be doable to have https://lezwatchtv.com/wp-json/lwtv/v1/stats/characters/ and output something like this:

Aisha Green":{
    "id":87560,
    "died":[""],
    "actors":1,
    "shows":{
        "SHOWNAME1": { 'years_appears', 'role', 'genres', 'airdates' },
        "SHOWNAME1": { 'years_appears', 'role', 'genres', 'airdates' },
    }
    "gender":"Cisgender",
    "sexuality":"Fluid",
    "url":"https:\/\/lezwatchtv.com\/character\/aisha-green\/"
}

The sticking point will be 'genres', 'airdates' since that would need a call back to the show. If that can be cached then yes :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant