From b0e30dbe724dd886b52b14e7bda13e1ca447cba4 Mon Sep 17 00:00:00 2001 From: Natty Date: Tue, 31 Oct 2023 17:49:29 +0100 Subject: [PATCH] Formatting, normalizing braces --- create-circle.js | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/create-circle.js b/create-circle.js index 30f5907..e410e04 100644 --- a/create-circle.js +++ b/create-circle.js @@ -3,8 +3,7 @@ * @param {RequestInfo | URL} url * @param {{ body?: any } & RequestInit?} options */ -async function apiRequestWithHeaders(url, options = null) -{ +async function apiRequestWithHeaders(url, options = null) { console.log(`Fetching :: ${url}`); if (options && options.body) { @@ -35,8 +34,7 @@ async function apiRequestWithHeaders(url, options = null) * @param {RequestInfo | URL} url * @param {{ body?: any } & RequestInit?} options */ -async function apiRequest(url, options = null) -{ +async function apiRequest(url, options = null) { const reply = await apiRequestWithHeaders(url, options); return reply?.body; } @@ -362,8 +360,7 @@ class MastodonApiClient extends ApiClient { * @param {Headers} headers * @return {URL | null} request URL for next page or null */ - static getNextPage(headers) - { + static getNextPage(headers) { /* * https://docs.joinmastodon.org/api/guidelines/#pagination * @@ -400,8 +397,7 @@ class MastodonApiClient extends ApiClient { * If set will be used to detect end of data early, without needing to request an empty page. * @param {boolean} exactTarget if true, discard entries exceeding targetCount */ - static async apiRequestPaged(url, targetCount, requestLimit = null, exactTarget = false) - { + static async apiRequestPaged(url, targetCount, requestLimit = null, exactTarget = false) { console.log(`Fetching repeatedly (${targetCount} a ${requestLimit}) :: ${url}`); let nextUrl = url;