Ruby

Ruby request method

get
Get Endpoint

https://neko-love.xyz/api/v1/:endpoint
Request
Response
Request
Path Parameters
Parameter Type
required
string
The "endpoint" parameter must be a valid type
Response
200: OK
"https://neko-love.xyz/v1/neko/neko-love_54.jpg"

Example:

require 'net/http'
require 'uri'
require 'json'
def nekoGET(url)
return JSON.parse(Net::HTTP.get_response(URI(url)).body)
rescue StandardError => e
return { "error" => "failed to get response : #{e.message}" }
end
#Methode call function "api_get"
nekoGET("https://neko-love.xyz/api/v1/neko")["url"]