How to use the API


Noodles API is an imagine manipulation/generation API to make memes or get random ones online, you can use it everywhere, no authorization is required for now, the base url is https://frenchnoodles.xyz/api/endpoints/${the endpoint}/?${input}, if you have any questions feel free to join the discord server Here!, Here are some code examples


API wrapper

Its always recommended to use the API wrapper noodles-wrapper using npm install noodles-wrapper, it will make ur life easier by turning all this complex code to easy functions with code examples , or the python version of that wrapper made by Cypher_Guy using pip install noodleswrapper

JavaScript

        
const fetch = require('node-fetch');

const res = await fetch(THELINK);
//DO whatever you want with "res"
//Replace "THELINK" with the API link + endpoint + input

//you can even do:
let Image = await res.buffer()
//To get the image, but dont forget that if there is an error, 
//then the response will be json not an image

//if you are not recieving any image, try doing 
console.log(await res.json())
//So you can see the JSON response from the server
        
    

Or using noodles-wrapper npm package

        
const  noodles_api  =  require('noodles-wrapper')
const Discord = require('discord.js')

let  text  =  args.toString().replace(/,/g,  '  ')
let  Image  =  await noodles_api.lisastage(text)

const  attachment  =  new  Discord.MessageAttachment(Image);
message.channel.send(attachment);
        
    

Python

        
from PIL import Image
import requests
from io import BytesIO

url = THELINK

res = requests.get(url)


#DO whatever you want with "res"
#Replace "THELINK" with the API link + endpoint + input

#you can even do:
try:
    image = Image.open(BytesIO(response.content))
    image.show()
except:
    print(response.json())
"""
this is so if the API returns an image, it shows the images
if the returns a json error, then you see the json error
"""
        
    

Or using noodleswrapper Pypi package

        
@client.command()
    async def lisastage(ctx):
    text = noodle.lisastage('test') #'test' is what you want it to say
    await ctx.send(file = text) #This should return a neat image.
        
    

Note:

If you want to escape characters like emojis for example, you can use this function: encodeURIComponent(text)
This function will turn escapable characters into normal characters and unescapable ones into squares, so the thing ur doing will never break as long as its a string, or just use the API wrapper which will do all of this for you

Quota:

Due to recent spamming incidents, quotas were added to stop the API from going down, down worry thoe! Its really subtle!

Free tier (default)

Hobby tier ($3)

Standard tier ($7) most popular

To buy a tier, please contact me on discord Here! And if you want a better tier than Standard feel free to contact me too, we can arrange something

Endpoints

You can see all the endpoints for the API by clicking the button down below

API Endpoints