Resolve external opponent TTR ratings and show lookup diagnostics
All checks were successful
Deploy tt-tagebuch / deploy (push) Successful in 1m0s
All checks were successful
Deploy tt-tagebuch / deploy (push) Successful in 1m0s
This commit is contained in:
@@ -869,6 +869,15 @@ class MyTischtennisClient {
|
||||
* @param {string} fedNickname - Federation nickname (e.g., "HeTTV")
|
||||
* @returns {Promise<Object>} Rankings with player entries (all pages)
|
||||
*/
|
||||
async searchClubs(cookie, query) {
|
||||
const result = await this.authenticatedRequest('/api/search/clubs', cookie, {
|
||||
method: 'POST', data: new URLSearchParams({ query }).toString()
|
||||
});
|
||||
if (!result.success) return result;
|
||||
if (!Array.isArray(result.data?.results)) return { success: false, error: 'Ungültige Antwort der myTischtennis-Vereinssuche' };
|
||||
return { success: true, clubs: result.data.results };
|
||||
}
|
||||
|
||||
async getClubRankings(cookie, clubId, fedNickname, currentRanking = 'yes', options = {}) {
|
||||
const { includeHistoryPlayerIds = false } = options;
|
||||
const allEntries = [];
|
||||
@@ -877,7 +886,7 @@ class MyTischtennisClient {
|
||||
|
||||
|
||||
while (hasMorePages) {
|
||||
const endpoint = `/rankings/andro-rangliste?all-players=on&clubnr=${clubId}&fednickname=${fedNickname}¤t-ranking=${currentRanking}&results-per-page=100&page=${currentPage}&_data=routes%2F%24`;
|
||||
const endpoint = `/rankings/andro-rangliste?all-players=on&continent=all&country=all&clubnr=${encodeURIComponent(clubId)}&fednickname=${encodeURIComponent(fedNickname)}¤t-ranking=${currentRanking}&results-per-page=100&page=${currentPage}&_data=routes%2F%24`;
|
||||
const result = await this.authenticatedRequest(endpoint, cookie, {
|
||||
method: 'GET'
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user