I'm using Fortnite API, more specifically the Python package, to write a Flask web server. I want to retrieve the Shop images and display them on my flask web server. Please note that I am fairly new to Python and Flask.
I've tried using @app.route("/shop") and making a for loop to get the pictures, and returning return item.information which should give me all of the links to the image (links look like this) and print them. I want to display them as images.
Here's what I've tried, I know it doesn't show them as images but I'm really new. The weird thing is, it doesn't even return all of the links.
from flask import Flask
from FortniteAPI import Shop
app = Flask(__name__)
@app.route("/shop")
def shop():
shop = Shop()
items = shop.get_items()
for item in items:
return item.information
I expected the output to show images of each item in the shop, yet it only prints one link and no images.
returnonly once in function - this is howreturnworks in all functions and in all languages - so you can do onlyreturn items. Or use template and then you can useforloop in template to getinformationfrom every item.. Or create list with information and return this list.