Diff
checker
Text
Text
Bilder
Dokumente
Excel
Ordner
Legal
Enterprise
Desktop-App
Preise
Einloggen
Diffchecker Desktop herunterladen
Texte vergleichen
Finde den Unterschied zwischen zwei Textdateien
Werkzeuge
Verlauf
Live-Editor
Gleiches ausblenden
Zeilenumbruch aus
Ansicht
Zweispaltig
Einspaltig
Vergleichsgenauigkeit
Intelligent
Wort
Zeichen
Syntaxhervorhebung
Syntax auswählen
Ignorieren
Text umwandeln
Zur ersten Änderung
Eingabe bearbeiten
Diffchecker Desktop
Der sicherste Weg, Diffchecker zu nutzen. Hol dir die Desktop-App: Deine Diffs verlassen nie deinen Computer!
Desktop holen
code diff twitch follows
Erstellt
vor 4 Jahren
Diff läuft nie ab
Löschen
Exportieren
Teilen
Erklären
3 Entfernungen
Zeilen
Gesamt
Entfernt
Zeichen
Gesamt
Entfernt
Um diese Funktion weiterhin zu nutzen, aktualisiere auf
Diff
checker
Pro
Preise anzeigen
53 Zeilen
Kopieren
1 Hinzufügung
Zeilen
Gesamt
Hinzugefügt
Zeichen
Gesamt
Hinzugefügt
Um diese Funktion weiterhin zu nutzen, aktualisiere auf
Diff
checker
Pro
Preise anzeigen
53 Zeilen
Kopieren
import common from "../common-polling.mjs";
import common from "../common-polling.mjs";
export default {
export default {
...common,
...common,
name: "New Follower (Instant)",
name: "New Follower (Instant)",
key: "twitch-new-follower",
key: "twitch-new-follower",
description: "Emit new event when a new user follows your channel.",
description: "Emit new event when a new user follows your channel.",
type: "source",
type: "source",
version: "0.0.4",
version: "0.0.4",
methods: {
methods: {
...common.methods,
...common.methods,
async getTopics() {
async getTopics() {
// get the authenticated user
// get the authenticated user
const { data } = await this.twitch.getUsers();
const { data } = await this.twitch.getUsers();
return [
return [
`users/follows?first=1&to_id=${data[0].id}`,
`users/follows?first=1&to_id=${data[0].id}`,
];
];
},
},
getMeta(item) {
getMeta(item) {
const {
const {
Kopieren
Kopiert
Kopieren
Kopiert
from_id,
to_id, followed_at, from_name,
to_id, followed_at, from_name,
} = item;
} = item;
return {
return {
Kopieren
Kopiert
Kopieren
Kopiert
id:
from_id +
to_id + followed_at,
id:
to_id + followed_at,
summary: `${from_name} is a new follower`,
summary: `${from_name} is a new follower`,
ts: new Date(followed_at).getTime(),
ts: new Date(followed_at).getTime(),
};
};
},
},
},
},
hooks: {
hooks: {
async deploy() {
async deploy() {
// get the authenticated user
// get the authenticated user
const { data: authenticatedUserData } = await this.twitch.getUsers();
const { data: authenticatedUserData } = await this.twitch.getUsers();
this.db.set("authenticatedUserId", authenticatedUserData[0].id);
this.db.set("authenticatedUserId", authenticatedUserData[0].id);
},
},
},
},
async run() {
async run() {
const params = {
const params = {
Kopieren
Kopiert
Kopieren
Kopiert
from
_id: this.db.get("authenticatedUserId"),
to
_id: this.db.get("authenticatedUserId"),
};
};
// get the user_ids of the streamers followed by the authenticated user
// get the user_ids of the streamers followed by the authenticated user
const follows = this.paginate(
const follows = this.paginate(
this.twitch.getUserFollows.bind(this),
this.twitch.getUserFollows.bind(this),
params,
params,
);
);
for await (const follow of follows) {
for await (const follow of follows) {
this.$emit(follow, this.getMeta(follow));
this.$emit(follow, this.getMeta(follow));
}
}
},
},
};
};
Gespeicherte Diffs
Originaltext
Datei öffnen
import common from "../common-polling.mjs"; export default { ...common, name: "New Follower (Instant)", key: "twitch-new-follower", description: "Emit new event when a new user follows your channel.", type: "source", version: "0.0.4", methods: { ...common.methods, async getTopics() { // get the authenticated user const { data } = await this.twitch.getUsers(); return [ `users/follows?first=1&to_id=${data[0].id}`, ]; }, getMeta(item) { const { from_id, to_id, followed_at, from_name, } = item; return { id: from_id + to_id + followed_at, summary: `${from_name} is a new follower`, ts: new Date(followed_at).getTime(), }; }, }, hooks: { async deploy() { // get the authenticated user const { data: authenticatedUserData } = await this.twitch.getUsers(); this.db.set("authenticatedUserId", authenticatedUserData[0].id); }, }, async run() { const params = { from_id: this.db.get("authenticatedUserId"), }; // get the user_ids of the streamers followed by the authenticated user const follows = this.paginate( this.twitch.getUserFollows.bind(this), params, ); for await (const follow of follows) { this.$emit(follow, this.getMeta(follow)); } }, };
Bearbeitung
Datei öffnen
import common from "../common-polling.mjs"; export default { ...common, name: "New Follower (Instant)", key: "twitch-new-follower", description: "Emit new event when a new user follows your channel.", type: "source", version: "0.0.4", methods: { ...common.methods, async getTopics() { // get the authenticated user const { data } = await this.twitch.getUsers(); return [ `users/follows?first=1&to_id=${data[0].id}`, ]; }, getMeta(item) { const { to_id, followed_at, from_name, } = item; return { id: to_id + followed_at, summary: `${from_name} is a new follower`, ts: new Date(followed_at).getTime(), }; }, }, hooks: { async deploy() { // get the authenticated user const { data: authenticatedUserData } = await this.twitch.getUsers(); this.db.set("authenticatedUserId", authenticatedUserData[0].id); }, }, async run() { const params = { to_id: this.db.get("authenticatedUserId"), }; // get the user_ids of the streamers followed by the authenticated user const follows = this.paginate( this.twitch.getUserFollows.bind(this), params, ); for await (const follow of follows) { this.$emit(follow, this.getMeta(follow)); } }, };
Unterschied finden