Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the ability to search an album's images based on the metadata #99

Open
KenEucker opened this issue Dec 15, 2021 · 1 comment
Open
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@KenEucker
Copy link
Owner

Feature request copied from kaimallea/node-imgur: kaimallea#174

Is your feature request related to a problem? Please describe.
The Imgur API does not provide a system for querying images. I have images that I have uploaded to Imgur, within albums that are on my Imgur account, that I want to be able to search within.

Describe the solution you'd like
I want to be able to use this Imgur API to "query" for an image within an album.

This could be accomplished by implementing a cache and using that cache to store album information, including all of the images within an album's metadata. Then, a "query" of an album's images would take an albumHash and a query, returning results where the query produces a match either in the title, description, or other provided fields passed in a third parameter params.

Describe alternatives you've considered
My application, using this API, does exactly this. A cache is being implemented on the API side for the album information that stores each album image's metadata information. In conjunction with the HTTP request cache being implemented, that cache could be used to store the "cached fields" that are most commonly used for queries: title and description. This simple form of searching for images would provide a lot of value above the normal offerings of the Imgur REST API.

Additional context
As this project meets it's goals of supporting all of the features of the Imgur REST API, and imgur@next is showing a lot of promise in achieving this goal by the end of 2021, I feel that this is a contribution that would be of great help to the community. If the code exists, and it exists within the community, and it can be incorporated without negative impact -- might we consider adding on top of the existing Imgur functionality?

Example:

import {ImgurClient} from 'imgur'

const imgurClient = new ImgurClient({ ...

...

const albumHash = 'a342f'
const query = 'cat'
const catImages = await imgurClient.searchAlbum(albumHash, query)

console.log( catImages )
@KenEucker
Copy link
Owner Author

This is needed for BikeTag.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant