-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapi_documentation.py
More file actions
51 lines (51 loc) · 2.53 KB
/
api_documentation.py
File metadata and controls
51 lines (51 loc) · 2.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
def generate_api_docs(base_url):
api_docs = {
"API Documentation": {
"title": "Wallzy - A Curated Wallpaper API",
"description": "Wallzy is a curated wallpaper 'API' to help you find your favorite new wallpapers.",
"endpoints": {
"/random": {
"description": "Returns a random image from the collection, could belong to any category.",
"url": f"{base_url}random"
},
"/nature": {
"description": "Images featuring natural elements like forests, mountains, lakes, flowers etc. Present in a variety of art-styles.",
"url": f"{base_url}nature",
},
"/ghibli": {
"description": "Stills captured directly from Studio Ghibli's beautiful movies.",
"url": f"{base_url}ghibli",
},
"/city": {
"description": "Images including bustling cities, quaint towns, buildings, bridges and other architecture.",
"url": f"{base_url}city",
},
"/abstract": {
"description": "Patterns, shapes & colors; experimental and abstract art.",
"url": f"{base_url}abstract",
},
"/painting": {
"description": "Beautiful paintings done in a variety of art forms.",
"url": f"{base_url}painting",
},
"/digital_art": {
"description": "Breathtaking digital artwork, created using tools like Krita, Blender, Photoshop, etc",
"url": f"{base_url}digital_art",
},
"/comfy": {
"description": "Images that evoke a cozy, 'comfy' feeling. Very subjective.",
"url": f"{base_url}comfy",
},
"/best": {
"description": "My personal favorite images out of the entire collection.",
"url": f"{base_url}best",
},
"/intersection/": {
"description": "Retrieve images based on multiple tags. Only the images matching all of the supplied tags will be considered.",
"url": f"{base_url}intersection/?tags=t1&tags=t2",
"example_usage": f"{base_url}intersection/?tags=nature&tags=painting&tags=best"
}
}
}
}
return api_docs