Simple web app that allows one to browse the Imgur gallery using React
- Show gallery images in a grid of thumbnails and lazy load them
- Show image description in the thumbnail, top or bottom
- On clicking an image in the gallery, show its details: big image, title, description, upvotes, downvotes, and score
- Filter the images based on: hot, top, user
- Include or exclude viral images from the result set
- Filter based on window and sort parameters;
var myHeaders = new Headers();
myHeaders.append("Authorization", "Client-ID {{clientId}}");
var requestOptions = {
method: 'GET',
headers: myHeaders,
redirect: 'follow'
};
fetch("https://api.imgur.com/3/gallery/{{section}}/{{sort}}/{{window}}/{{page}}?showViral={{showViral}}&mature={{showMature}}&album_previews={{albumPreviews}}", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
fetch("https://api.imgur.com/3/image/{{imageHash}}", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));