You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Blogs are like caffine for writers for which they always tries to find interesting stuffs(images/quotes/GIFs) to encourage readers to read even a long blog.Now, Blogs are of various genres, so it is very difficuly for a writes to get apt images to insert in their blog. So, I've developed a script which is very much easy to use and which can find 20+ images instantly and also provides the link(Unsplash link).
6
+
7
+
## Explanation of code
8
+
9
+
- unsplash API is used to fetch all images(https://api.unsplash.com/search/photos?per_page=30&query=[word]&client_id=[key])
10
+
- An API key is required to use the API in your app, which can easily be obtained from [unsplash official website](https://unsplash.com/developers).
11
+
- Async/Await is used to consume promises.
12
+
- Script is dependent on a basic boilerplate HTML file, which displays all the images retreived by the script.
13
+
- To get link of any image, just click on that, a pop-up/alert window with link will appear.
14
+
15
+
## To run the code
16
+
17
+
- Clone the folder
18
+
- Inside the folder open index.html or in some editor you can use live-server to run HTML file.
19
+
- Then search images of which category/genre you want.
20
+
21
+
## Output
22
+

23
+
code by [Piyush Gupta](https://github.com/gupta-piyush19)
0 commit comments