Juriy / swapi

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

Adding an indicative image with every response? #20

Closed CptGeo closed 3 years ago

CptGeo commented 3 years ago

Hello, I have been playing around with swapi for a bit while attending a react course, so I was wondering whether there is a possibility of adding a sample image in the responses.

I guess it is something that others may have thought of but I do not see it implemented yet so I had to ask .

It could probably be something like :point_down:

{
    "name": "C-3PO",
    "height": "167",
    "mass": "75",
    "hair_color": "n/a",
    "skin_color": "gold",
    "eye_color": "yellow",
    "birth_year": "112BBY",
    "gender": "n/a",
    "homeworld": "http://swapi.dev/api/planets/1/",
    "films": [
        "http://swapi.dev/api/films/1/",
        "http://swapi.dev/api/films/2/",
        "http://swapi.dev/api/films/3/",
        "http://swapi.dev/api/films/4/",
        "http://swapi.dev/api/films/5/",
        "http://swapi.dev/api/films/6/"
    ],
    "species": [
        "http://swapi.dev/api/species/2/"
    ],
    "vehicles": [],
    "starships": [],
    "created": "2014-12-10T15:10:51.357000Z",
    "edited": "2014-12-20T21:17:50.309000Z",
    "url": "http://swapi.dev/api/people/2/",
        "sample_image" : "https://upload.wikimedia.org/wikipedia/en/thumb/5/5c/C-3PO_droid.png/220px-C-3PO_droid.png"
}

Thank you :smiley:

Juriy commented 3 years ago

This is a great idea and it is already in a feature list for the next API version. For historical and compatibility reasons we'll leave the existing API version without changes, but next one will definitely have some image links.