Juriy / swapi

SWAPI - Star Wars API service
https://swapi.dev
BSD 3-Clause "New" or "Revised" License
282 stars 91 forks source link

No image for star wars characters, films, planets any other resource #56

Open mustaneerhaider01 opened 1 year ago

mustaneerhaider01 commented 1 year ago

I was building a website where users can see all star wars charaters, films, planets but the data i get back from api has no image to display and actually i was using a graphql service called stepzen for it and it made so sad it created whole graphql api for me based on your rest api and in the end i noticed no image. Why u forgot to add image. Image is so necssary.

DavidNgugi commented 1 year ago

Here are some for you


{
  "characters": [
    {
      "id": 1,
      "name": "Luke Skywalker",
      "photo": "https://vignette.wikia.nocookie.net/starwars/images/2/20/LukeTLJ.jpg"
    },
    {
      "id": 2,
      "name": "C-3PO",
      "photo": "https://vignette.wikia.nocookie.net/starwars/images/3/3f/C-3PO_TLJ_Card_Trader_Award_Card.png"
    },
    {
      "id": 3,
      "name": "R2-D2",
      "photo": "https://vignette.wikia.nocookie.net/starwars/images/e/eb/ArtooTFA2-Fathead.png"
    },
    {
      "id": 4,
      "name": "Darth Vader",
      "photo": "https://vignette.wikia.nocookie.net/fr.starwars/images/3/32/Dark_Vador.jpg"
    },
    {
      "id": 5,
      "name": "Leia Organa",
      "photo": "https://vignette.wikia.nocookie.net/starwars/images/f/fc/Leia_Organa_TLJ.png"
    },
    {
      "id": 6,
      "name": "Owen Lars",
      "photo": "https://vignette.wikia.nocookie.net/starwars/images/e/eb/OwenCardTrader.png"
    },
    {
      "id": 7,
      "name": "Beru Whitesun lars",
      "photo": "https://vignette.wikia.nocookie.net/starwars/images/c/cc/BeruCardTrader.png"
    },
    {
      "id": 8,
      "name": "R5-D4",
      "photo": "https://vignette.wikia.nocookie.net/starwars/images/c/cb/R5-D4_Sideshow.png"
    },
    {
      "id": 9,
      "name": "Biggs Darklighter",
      "photo": "https://vignette.wikia.nocookie.net/starwars/images/0/00/BiggsHS-ANH.png"
    },
    {
      "id": 10,
      "name": "Obi-Wan Kenobi",
      "photo": "https://vignette.wikia.nocookie.net/starwars/images/4/4e/ObiWanHS-SWE.jpg"
    },
    {
      "id": 11,
      "name": "Anakin Skywalker",
      "photo": "https://vignette.wikia.nocookie.net/starwars/images/6/6f/Anakin_Skywalker_RotS.png"
    },
    {
      "id": 12,
      "name": "Wilhuff Tarkin",
      "photo": "https://vignette.wikia.nocookie.net/starwars/images/c/c1/Tarkininfobox.jpg"
    },
    {
      "id": 13,
      "name": "Chewbacca",
      "photo": "https://vignette.wikia.nocookie.net/starwars/images/4/48/Chewbacca_TLJ.png"
    },
    {
      "id": 14,
      "name": "Han Solo",
      "photo": "https://vignette.wikia.nocookie.net/starwars/images/e/e2/TFAHanSolo.png"
    },
    {
      "id": 15,
      "name": "Greedo",
      "photo": "https://vignette.wikia.nocookie.net/starwars/images/c/c6/Greedo.jpg"
    },
    {
      "id": 16,
      "name": "Jabba Desilijic Tiure",
      "photo": "https://vignette.wikia.nocookie.net/starwars/images/7/7f/Jabba_SWSB.png"
    },
    {
      "id": 18,
      "name": "Wedge Antilles",
      "photo": "https://vignette.wikia.nocookie.net/starwars/images/6/60/WedgeHelmetless-ROTJHD.jpg"
    },
    {
      "id": 19,
      "name": "Jek Tono Porkins",
      "photo": "https://vignette.wikia.nocookie.net/starwars/images/e/eb/JekPorkins-DB.png"
    },
    {
      "id": 20,
      "name": "Yoda",
      "photo": "https://vignette.wikia.nocookie.net/starwars/images/d/d6/Yoda_SWSB.png"
    },
    {
      "id": 21,
      "name": "Palpatine",
      "photo": "https://vignette.wikia.nocookie.net/starwars/images/d/d8/Emperor_Sidious.png"
    }
  ]
}
wenubey commented 1 year ago

Hello, I will try to fetch just images from the character's id. SWAPI and this API id's are identical maybe it might work https://github.com/akabab/starwars-api