Skip to content

Commit

Permalink
removed friends endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
builder-247 committed Feb 18, 2023
1 parent c89fd08 commit 5111204
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 75 deletions.
3 changes: 0 additions & 3 deletions config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ const defaults = {
GROUP: '', // for specifying the group of apps that should be run when entry point is invoked
NODE_ENV: 'development',
FRONTEND_PORT: 5000,
ITEMS_PORT: 5100,
MOJANG_STATUS_INTERVAL: 15000, // Interval between refreshing Mojang status in milliseconds
REDIS_URL: 'redis://127.0.0.1:6379/0', // connection string for Redis
SENTRY_URL: '',
API_FREE_LIMIT: 50000, // number of api requests per month before 429 is returned.
Expand All @@ -30,7 +28,6 @@ const defaults = {
ENABLE_COUNTS_STASH: true, // cache counts
ENABLE_LEADERBOARD_CACHE: true, // cache leaderboards
ENABLE_AUCTION_CACHE: true, // cache auctions
ENABLE_DB_CACHE: true, // set to enable MongoDB cache
UUID_CACHE_SECONDS: 21600, // number of seconds to cache username-uuid pairs
PLAYER_CACHE_SECONDS: 600, // number of seconds to cache players
GUILD_CACHE_SECONDS: 600, // number of seconds to cache guilds
Expand Down
52 changes: 0 additions & 52 deletions routes/spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ const filterObject = require('filter-obj');
const constants = require('hypixelconstants');
const redis = require('../store/redis');
const buildPlayerStatus = require('../store/buildPlayerStatus');
const buildPlayerFriends = require('../store/buildPlayerFriends');
const getUUID = require('../store/getUUID');
const buildBans = require('../store/buildBans');
const buildBoosters = require('../store/buildBoosters');
Expand Down Expand Up @@ -623,57 +622,6 @@ Consider supporting The Slothpixel Project on Patreon to help cover the hosting
},
},
},
'/players/{playerName}/friends': {
get: {
summary: 'Get friends for a given player',
description: 'Returns friendships for given player.',
operationId: 'getPlayerFriends',
tags: [
'player',
],
parameters: [
playerNameParam,
],
responses: {
200: {
description: 'successful operation',
content: {
'application/json': {
schema: {
type: 'array',
items: {
type: 'object',
properties: {
uuid: {
type: 'string',
},
sent_by: {
type: 'string',
},
started: {
type: 'integer',
},
},
},
},
},
},
},
},
route: () => '/players/:player/friends',
func: async (request, response, callback) => {
try {
try {
response.json(await buildPlayerFriends(request.params.player));
} catch (error) {
callback(error.message);
}
} catch (error) {
response.status(404).json({ error: error.message });
}
},
},
},
'/players/{playerName}/status': {
get: {
summary: 'Get current player activity',
Expand Down
15 changes: 0 additions & 15 deletions store/buildPlayerFriends.js

This file was deleted.

5 changes: 0 additions & 5 deletions util/utility.js
Original file line number Diff line number Diff line change
Expand Up @@ -257,11 +257,6 @@ function generateJob(type, payload) {
url: `${apiUrl}/guild?key=${apiKey}&id=${payload.id}`,
};
},
friends() {
return {
url: `${apiUrl}/friends?key=${apiKey}&uuid=${payload.id}`,
};
},
gamecounts() {
return {
url: `${apiUrl}/gamecounts?key=${apiKey}`,
Expand Down

0 comments on commit 5111204

Please sign in to comment.