Hi,
I am working on a Minecraft mod that will gather data from an appwrite database. I got it working but i want to add Queries if possible.
This is my current code:
TypeScript
private void fetchPlayerRank(String playerName) {
String url = APPWRITE_ENDPOINT + "/databases/" + DATABASE_ID + "/collections/" + COLLECTION_ID + "/documents";
LOGGER.info("Fetching rank data for " + playerName + " from " + url);
try {
// Create the URL object
URL urlObj = new URL(url);
HttpURLConnection connection = (HttpURLConnection) urlObj.openConnection();
// Set the request method and headers
connection.setRequestMethod("GET");
connection.setRequestProperty("X-Appwrite-Project", PROJECT_ID);
connection.setRequestProperty("X-Appwrite-Key", API_KEY);
// Get the response code
int statusCode = connection.getResponseCode();
if (statusCode >= 200 && statusCode < 300) {
// Success - process the response
try (BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()))) {
String inputLine;
StringBuilder response = new StringBuilder();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
LOGGER.info("Rank data for " + playerName + ": " + response.toString());
}
} else {
// Log unexpected status codes
LOGGER.error("Unexpected response code: " + statusCode);
}
} catch (IOException e) {
LOGGER.error("Failed to fetch rank data: ", e);
}}
TL;DR
Developers wants to add queries to their HTTPRequest code for a Minecraft mod interacting with an appwrite database. They included their current code for fetching player rank data.Recommended threads
- Bulk API limitations in self-hosted serv...
Environment: Appwrite Selfhost SDK: node-appwrite 28.0 Calling `upsertRows` (also applies to `createRows`/`updateRows`/`deleteRows`) with more than 100 rows fa...
- Android SDK: Kotlin null Value Not Updat...
Hi team, I think you should check the Android SDK implementation once, as it seems to have an issue handling Kotlin **null** values. For example: When I send:...
- IMPORTANT! SOC-2 Request Failing
Issue requesting SOC-2. If tried other/private browser as well as filling in optional fields.