-
Notifications
You must be signed in to change notification settings - Fork 1
/
examples.js
40 lines (31 loc) · 1.35 KB
/
examples.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// EXAMPLE CALL SCRATCHPAD
// GET Individual tweet response
T.get('statuses/show/:id', {id: '1533961937352105984', include_ext_alt_text: true}).then(({data}) => {
//console.log(data)
var parentAltText = data?.extended_entities?.media?.[0]?.ext_alt_text || '';
var parentWordleResult = getWordleMatrixFromText(data.text);
parentWordleResult = parentWordleResult.length > 0 ?
parentWordleResult : getWordleMatrixFromImageAltText(parentAltText);
console.log(parentWordleResult);
// const wordleResult = getWordleMatrixFromText(data.text);
// const score = calculateScoreFromWordleMatrix(wordleResult).finalScore;
// const solvedRow = getSolvedRow(wordleResult);
// console.log(`The wordle scored ${score} out of 360${getSentenceSuffix(solvedRow)} ${getCompliment()}`)
});
// GET a11y text for testing
T.get('statuses/show/:id', {id: '1608109623889756160', include_ext_alt_text: true}).then(({data}) => {
var text = data?.extended_entities?.media?.[0]?.ext_alt_text || '';
console.log(text);
console.log(getWordleMatrixFromImageAltText(text));
});
/*
https://socel.net/@tomwe/109773963630240355
#Wordle 589 4/6
Analysis...
⬛🟨⬛🟨⬛ 197 words left.
🟨⬛⬛⬛🟨 17 words left.
⬛⬛⬛⬛🟨 5 words left.
🟩🟩🟩🟩🟩 1 words left.
https://www.stevedegroof.com/word-check.html
#WordleWarriors
*/