from flask import Flask, request
from flask_restful import Resource, Api
from json import dumps
from flask_jsonpify import jsonify


app = Flask(__name__)
api = Api(app)
 
class ArtL3(Resource):
    def get(self, part, l1, l2, l3):
        return f"{part}-{l1}-{l2}-{l3}"
        
 
class ArtL2(Resource):
    def get(self, part, l1, l2):
        return f"{part}-{l1}-{l2}"


class ArtL1(Resource):
    def get(self, part, l1):
        return f"{part}-{l1}"


class ArtL0(Resource):
    def get(self, part):
        return f"{part}"


class ArtS(Resource):
    def get(self, query):
        return f"{query}"


api.add_resource(ArtL3, '/art/<part>/<l1>/<l2>/<l3>')
api.add_resource(ArtL2, '/art/<part>/<l1>/<l2>')
api.add_resource(ArtL1, '/art/<part>/<l1>')
api.add_resource(ArtL0, '/art/<part>')
api.add_resource(ArtS, '/art_s/<query>')


if __name__ == '__main__':
     app.run(port='8108')