Releases: Sstudios-Dev/image-core
Image-core v1.0.9
In this new version
we have added more images to the repository
and we have also fixed
a couple of bugs in the anime module
Example
NOPE 😒
npm created by Sstudios team SstudiosDev © SstudiosTeam
Contributors
Image-core v1.0.8
In this new version
we have added more images to the repository
and we have also fixed
a couple of bugs in the anime module
Example
NOPE 😒
npm created by Sstudios team SstudiosDev © SstudiosTeam
Contributors
Image-core v1.0.7
In this new version
we have fixed
the error that they had the anime module that did not allow it to be used, also due to Github policies
, we had to remove the nsfw
module so at the moment there are only two modules again
Example
NOPE 😒
npm created by Sstudios team SstudiosDev © SstudiosTeam
Contributors
Image-core v1.0.6
in this new version
we have fixed bugs
in the code, there are also new images uploaded
to our servers. In this version we have also added the new module, which is the NSFW module
, which is content for people over 18 years old This new model also currently has 30 images
but in the future there will be more.
Example
const { getRandomNsfwImageUrl } = require('imagen-core');
/**
* Example function to demonstrate getting a random NSFW image URL.
* It uses the getRandomNsfwImageUrl function to retrieve the URL and image name,
* and then logs them to the console.
*/
async function exampleGetRandomNsfwImageUrl() {
try {
// Call the getRandomNsfwImageUrl function to get the URL and image name
const { NsfwImageUrlFull, imageName } = await getRandomNsfwImageUrl();
// Log the full NSFW image URL and image name to the console
console.log('Full NSFW image URL:', NsfwImageUrlFull);
console.log('Image name:', imageName);
} catch (error) {
console.error('Error getting the NSFW image:', error);
}
}
// Run the example function
exampleGetRandomNsfwImageUrl();
npm created by Sstudios team SstudiosDev © SstudiosTeam
Contributors
Image-core v1.0.5
In the new update 1.0.5
we have optimized
the base code that are uploaded in npm we have also fixed bugs
and image-core
already has support with discord.js
for use in discord bots
and in the anime module new images
have been added currently mind the module has 120 images
at the moment
Example
const { getRandomAnimeImageUrl } = require('imagen-core');
// Array to store anime images
let animeImages = [];
// Function to save a new anime image to the array
async function saveAnimeImage() {
try {
const { animeImageUrlFull, imageName } = await getRandomAnimeImageUrl();
animeImages.push({ url: animeImageUrlFull, name: imageName });
console.log('Anime image saved:', { url: animeImageUrlFull, name: imageName });
} catch (error) {
console.error('Error getting anime image:', error);
}
}
// Call the function to save an anime image
saveAnimeImage();
npm created by Sstudios team SstudiosDev © SstudiosTeam
Contributors
Image-core v1.0.4
What we did in this version was to fix bugs
we also changed the node-fetch
dependency and changed the base code extension from .mjs
to .js
the difference is that before to use npm
you needed your project to be module
and now you need your project to be commonjs
to work well.
to make npm
work properly you need to put this in your package.json
of your project
{
"type": "commonjs", // you have to add this
"dependencies": {
"imagen-core": "^1.0.4"
}
}
npm created by Sstudios team SstudiosDev © SstudiosTeam
Contributors
Image-core v1.0.3
In this new version we fixed bugs
and also added the following features
downloadRandomAnimeImage
GetRandomAnimeImageUrl
These functions work like the others only that it shows pictures of anime
that are in our database
.
import { downloadRandomAnimeImage } from 'imagen-core';
async function testDownloadRandomAnimeImage() {
try {
await downloadRandomAnimeImage();
console.log('Random anime image downloaded successfully');
} catch (error) {
console.error('Error downloading random anime image:', error);
}
}
// Test downloadRandomAnimeImage
testDownloadRandomAnimeImage();
Image-core v1.0.2
In this new version we have only fixed
a couple of bugs
and we have also added 12 new images
to the api so at the moment there are only 36 images available
and soon we will add more than +20 images
.
// downloadImageExample.js
// Import the function downloadRandomImage from index.mjs file
import { downloadRandomImage } from 'imagen-core';
// Calling the downloadRandomImage function to download an image
async function exampleDownloadRandomImage() {
try {
await downloadRandomImage();
console.log('Image downloaded successfully.');
} catch (error) {
console.error('Error downloading the image:', error);
}
}
// Execute the example
exampleDownloadRandomImage();
Image-core v1.0.1
This version has the same functionality as version 1.0.0
only that we fixed some bugs like the test.js
folder that was in the npm code and we also improved the test code of downloadRandomImage
.
// downloadImageExample.js
// Import the function downloadRandomImage from index.mjs file
import { downloadRandomImage } from 'imagen-core';
// Calling the downloadRandomImage function to download an image
async function exampleDownloadRandomImage() {
try {
await downloadRandomImage();
console.log('Image downloaded successfully.');
} catch (error) {
console.error('Error downloading the image:', error);
}
}
// Execute the example
exampleDownloadRandomImage();