What this category needs
curl --request GET \
--url https://api.moonup.gg/v1/offers/games/{game}/categories/{category_slug}/schemaimport requests
url = "https://api.moonup.gg/v1/offers/games/{game}/categories/{category_slug}/schema"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.moonup.gg/v1/offers/games/{game}/categories/{category_slug}/schema', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.moonup.gg/v1/offers/games/{game}/categories/{category_slug}/schema",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.moonup.gg/v1/offers/games/{game}/categories/{category_slug}/schema"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.moonup.gg/v1/offers/games/{game}/categories/{category_slug}/schema")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.moonup.gg/v1/offers/games/{game}/categories/{category_slug}/schema")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"id": "018f2c1e-0000-7000-8000-000000000001",
"game_category_id": "018f2c1e-0000-7000-8000-000000000002",
"version": 1,
"attributes": [
{
"key": "more_played_game",
"label": "Most Played Game",
"type": "enum",
"required": true,
"filterable": true,
"enum_values": [
"Blox Fruits",
"Adopt Me!"
]
},
{
"key": "robux_balance",
"label": "Robux Balance",
"type": "number",
"required": false,
"filterable": false,
"min": 0
}
]
}Catalog
What this category needs
The one call to make before building a create body: attributes[] is
the category’s field list, and version is what a listing created now
is pinned to. What else a body must carry is the category’s own create
page — each category takes only its own fields.
GET
/
v1
/
offers
/
games
/
{game}
/
categories
/
{category_slug}
/
schema
What this category needs
curl --request GET \
--url https://api.moonup.gg/v1/offers/games/{game}/categories/{category_slug}/schemaimport requests
url = "https://api.moonup.gg/v1/offers/games/{game}/categories/{category_slug}/schema"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.moonup.gg/v1/offers/games/{game}/categories/{category_slug}/schema', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.moonup.gg/v1/offers/games/{game}/categories/{category_slug}/schema",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.moonup.gg/v1/offers/games/{game}/categories/{category_slug}/schema"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.moonup.gg/v1/offers/games/{game}/categories/{category_slug}/schema")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.moonup.gg/v1/offers/games/{game}/categories/{category_slug}/schema")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"id": "018f2c1e-0000-7000-8000-000000000001",
"game_category_id": "018f2c1e-0000-7000-8000-000000000002",
"version": 1,
"attributes": [
{
"key": "more_played_game",
"label": "Most Played Game",
"type": "enum",
"required": true,
"filterable": true,
"enum_values": [
"Blox Fruits",
"Adopt Me!"
]
},
{
"key": "robux_balance",
"label": "Robux Balance",
"type": "number",
"required": false,
"filterable": false,
"min": 0
}
]
}Параметры пути
The game's slug, or its id — both are accepted.
Пример:
"roblox"
Пример:
"accounts"
