- Notifications
You must be signed in to change notification settings - Fork723
Updated the Image Generator#38
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Catboys API image generator is not working so I replaced it with a similar image generator
Imran-imtiaz48 left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
code changes you've made represent a successful update! Here's a review:
Functionality:
The core functionality remains the same: displaying a loading message and spinner while fetching an image, then updating the button and image once the data is received.
Change:
The key change is the API endpoint used. You've switched fromhttps://api.catboys.com/img tohttps://nekos.life/api/v2/img/neko. This means you're now fetching images of cats (nekomimi) instead of catboys.
Overall:
This update effectively modifies the image source to display a different type of image (neko) while preserving the core logic of the code.
Additional Considerations:
API Differences: It's important to check if the new API (https://nekos.life/api/v2/img/neko) has any structural differences in the returned data compared to the previous one. If so, you might need to adjust how you access the image URL within the data object.
Clarity: Depending on the purpose of your code, you might consider renaming the button text or providing a visual cue (like an icon change) to indicate the switch from catboys to nekos. This improves user clarity.
Nice Work!
This update demonstrates a well-executed change while maintaining the overall functionality of the code.
Catboys API image generator is not working so I replaced it with a similar image generator