Skip to content

Commit

Permalink
instance → server
Browse files Browse the repository at this point in the history
  • Loading branch information
tamaina committed Mar 3, 2023
1 parent 14c1687 commit af5a9fd
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 21 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# api
joinmisskey instances' information api
joinmisskey servers' information api

https://instanceapp.misskey.page/instances.json

Expand All @@ -25,16 +25,16 @@ You can get the following information under https://instanceapp.misskey.page
notesCount: Number, // Total notes
usersCount: Number, // Total Users
mau: Number, // Total MAUs
instancesCount: Number, // Instances counter
instancesCount: Number, // Servers counter
},
instancesInfos: [ // Instances Infos (only alives)
instancesInfos: [ // Servers Infos (only alives)
{
url: String, // Hostname e.g. misskey.io
name: String, // Name e.g. すしすきー
langs: String[], // Language the API author aqz set manually e.g. ["ja"], ["zh"]
description: String | Null, // meta.description or the the API author aqz set manually
isAlive: true, // must true
value: Number, // The Instance Value calculated from the version, etc.
value: Number, // The server Value calculated from the version, etc.
banner: Bool, // Banner existance
background: Bool,// Background Image existance
icon: Bool, // Icon Image existance
Expand All @@ -49,7 +49,7 @@ You can get the following information under https://instanceapp.misskey.page
```

### /instance-banners/instance.host.{jpeg|webp}
Banner of each instances (lightweighted)
Banner of each servers (lightweighted)

### /instance-backgrounds/instance.host.{jpeg|webp}
Background image (displayed behind the welcome page) (lightweighted)
Expand All @@ -58,10 +58,10 @@ Background image (displayed behind the welcome page) (lightweighted)
Icon (not favicon) (lightweighted)

### /alives.txt
List of hosts (separated by `\n`) for instances that were able to communicate
List of hosts (separated by `\n`) for servers that were able to communicate

### /deads.txt
List of hosts (separated by `\n`) for instances that were unable to communicate
List of hosts (separated by `\n`) for servers that were unable to communicate

### versions.json
Version list obtained from GitHub
16 changes: 8 additions & 8 deletions data/instances.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
########################################
###### インスタンスリスト #######
###### The List of Instances #######
###### サーバーリスト #######
###### The List of Servers #######
########################################
# joinmisskeyのインスタンスリストは現状手動更新です
# joinmisskeyのサーバーリストは現状手動更新です
#
# url: インスタンスのドメインを指定します
# langs: インスタンスの言語を文字列の配列で指定します
# suspended: bool. インスタンスの存在自体を隠蔽します
# url: サーバーのドメインを指定します
# langs: サーバーの言語を文字列の配列で指定します
# suspended: bool. サーバーの存在自体を隠蔽します
# description: 説明を上書きします。通常は指定しません。
# name: インスタンス名を上書きします。通常は指定しません。
# name: サーバー名を上書きします。通常は指定しません。
#
- url: misskey.io
- url: misskey.dev
Expand All @@ -25,7 +25,7 @@
langs: ['ja']
- name: 'Misskey(Tor)'
url: 5z5ce433e2yp73jqm3yxmyh2yvcn33venhnm5trqde6uwjysxyy3gbad.onion
description: xps2氏が運営するTor上のインスタンス
description: xps2氏が運営するTor上のサーバー
langs: ['ja']
- url: misskey.nokotaro.com
langs: ['ja']
Expand Down
8 changes: 4 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -238,12 +238,12 @@ getInstancesInfos()
method: "POST",
body: JSON.stringify({
i: process.env.MK_TOKEN,
text: `JoinMisskey instance api is updated at ${INSTANCES_JSON.date.toISOString()}.
text: `JoinMisskey servers api is updated at ${INSTANCES_JSON.date.toISOString()}.
Total Notes: ${INSTANCES_JSON.stats.notesCount}
Total Users: ${INSTANCES_JSON.stats.usersCount}
Total MAU: ${INSTANCES_JSON.stats.mau}
Total Instances: ${INSTANCES_JSON.stats.instancesCount}
Total Servers: ${INSTANCES_JSON.stats.instancesCount}
https://join.misskey.page/\n#bot #joinmisskeyupdate`,
}),
Expand Down Expand Up @@ -278,7 +278,7 @@ https://join.misskey.page/\n#bot #joinmisskeyupdate`,
method: "POST",
body: JSON.stringify({
i: process.env.MK_TOKEN,
text: `日本語インスタンス (トップ30)\n\n${getInstancesList(japaneseInstances)}`,
text: `日本語サーバー (トップ30)\n\n${getInstancesList(japaneseInstances)}`,
replyId: tree.createdNote.id,
}),
headers: {
Expand Down Expand Up @@ -317,7 +317,7 @@ https://join.misskey.page/\n#bot #joinmisskeyupdate`,
method: "POST",
body: JSON.stringify({
i: process.env.MK_TOKEN,
text: `JoinMisskey instance api is now updated.\nUNLISTED INSTANCE(S) FOUND! @aqz\n\n${notIncluded.join('\n')}\n#bot`
text: `JoinMisskey servers api is now updated.\nUNLISTED INSTANCE(S) FOUND! @aqz\n\n${notIncluded.join('\n')}\n#bot`
}),
headers: {
"Content-Type": "application/json"
Expand Down
4 changes: 2 additions & 2 deletions instanceq.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ const duplicated = mylist.filter((e, i, arr) => arr.findIndex(x => x.url === e.u
.map(e => e.url)

if (duplicated.length > 0) console.log(`Duplicated:\n ${duplicated.join(",\n ")}\n`);
else console.log("Duplicated:\n There is no duplicated instance!\n");
else console.log("Duplicated:\n There is no duplicated server!\n");

const invalid = mylist.filter(e => e.langs !== undefined && !Array.isArray(e.langs))
.map(e => e.url)

if (invalid.length > 0) console.log(`Invalid:\n ${invalid.join(",\n ")}\n`);

export default async () => {
console.log(`Get Instances from misskey.io`);
console.log(`Get servers from misskey.io`);

const notIncluded = new Set();
const apinum = 60
Expand Down

0 comments on commit af5a9fd

Please sign in to comment.