- TekstowoAPIRequestOptions
- TekstowoAPISearchResults
- TekstowoAPIArtistProfile
- TekstowoAPILyrics
- TekstowoAPI
- KVPair
- AutomaticSortDirection(sortMode)
- parseDate(input)
- parseComments(htmlString)
- getDuplicates(arr) ⇒
Array
- constructObject(keys, values) ⇒
Object
- findClosestString(distances) ⇒
DistanceCompareResult
- levenshteinDistanceArray(strArray, targetStr) ⇒
Array.<Distance>
- levenshteinDistance(str1, str2) ⇒
number
- unescapeJsonString(jsonString) ⇒
string
- unescapeHtmlString(htmlString) ⇒
string
- getTextBetween(text, start, end) ⇒
Array.<string>
- TekstowoAPILyricsID :
String
- TekstowoAPIArtistID :
String
- TekstowoAPILyricsMetadata
just an Object
- Distance
- DistanceCompareResult
Param | Type |
---|---|
url | string |
fetchOptions | RequestInit |
Param | Type |
---|---|
songs | Object.<string, TekstowoAPILyricsID> |
artists | Object.<string, TekstowoAPIArtistID> |
pageCount | number |
new TekstowoAPIArtistProfile(displayName, artistDescription, images, discography, commentCount, internalId)
Param | Type |
---|---|
displayName | string |
artistDescription | string |
images | Array.<{hd: string, small: string}> |
discography | Array.<{year: number, name: string}> |
commentCount | number | undefined |
internalId | string | undefined |
new TekstowoAPILyrics(original, translated, metadata, lyricsName, video, internalId, [aiGeneratedTranslation], commentCount)
Param | Type | Default | Description |
---|---|---|---|
original | string |
||
translated | string |
||
metadata | Object |
||
lyricsName | string |
||
video | string |
YouTube video ID | |
internalId | string |
ID used by vote system or comments | |
[aiGeneratedTranslation] | boolean |
false |
Is the translation made by AI? |
commentCount | number | undefined |
How many comments are on this lyrics page? |
Kind: global class
- TekstowoAPI
- new TekstowoAPI(FetchImpl, proxyMetod)
- .FetchImpl :
fetch
- .ConstantURLPaths :
ConstantURLPaths
- .makeRequest(options) ⇒
Promise.<Response>
- .proxyThisUrl(url) ⇒
string
- .extractLyrics(songId, options) ⇒
Promise.<(TekstowoAPILyrics|null)>
.searchLyrics(artist, songName, page, includePageCount) ⇒Promise.<Object.<string, TekstowoAPILyricsID>>
- .search(query, options) ⇒
Promise.<(Object.<string, (TekstowoAPILyricsID|TekstowoAPIArtistID)>|TekstowoAPISearchResults)>
.getPagesForSong()- .getPagesForQuery(query, skipFetch, from) ⇒
Promise.<number>
- .getLyrics(artist, songName) ⇒
Promise.<(TekstowoAPILyrics|null)>
- .getMetadata(songIdOrHtml, useHTML) ⇒
Promise.<(TekstowoAPILyricsMetadata|null)>
- .getArtistsSongList(artistId, options) ⇒
Promise.<{pageCount: number, results: Array.<KVPair.<string, TekstowoAPIArtistID>>}>
- .requestComments(internalId, offset, mode)
Creates a new TekstowoAPI instance
Param | Type |
---|---|
FetchImpl | fetch |
proxyMetod | TekstowoAPIProxyMethods |
Kind: instance property of TekstowoAPI
Kind: instance property of TekstowoAPI
Makes a request using TekstowoAPI#FetchImpl.
Kind: instance method of TekstowoAPI
See: TekstowoAPI#FetchImpl
Param | Type |
---|---|
options | TekstowoAPIRequestOptions |
Selects a proxy using TekstowoAPI#proxyMetod.
Kind: instance method of TekstowoAPI
See: TekstowoAPI#proxyMetod
Param | Type |
---|---|
url | string |
Downloads and parses lyrics page for specified arguments.
Kind: instance method of TekstowoAPI
Param | Type | Description |
---|---|---|
songId | TekstowoAPILyricsID |
|
options | Object |
Options for extraction. Providing a boolean here is deprecated. |
options.withMetadata | boolean |
|
options.withVideoId | boolean |
tekstowoAPI.searchLyrics(artist, songName, page, includePageCount) ⇒ Promise.<Object.<string, TekstowoAPILyricsID>>
Promise.<Object.<string, TekstowoAPILyricsID>>
Deprecated
Downloads and parses search result page for specified arguments.
Kind: instance method of TekstowoAPI
Param | Type | Default | Description |
---|---|---|---|
artist | string |
||
songName | string |
||
page | number |
||
includePageCount | boolean |
false |
Adds undocumented property, "INTERNAL_PAGE_COUNT" (not-enumerable) with value returned by TekstowoAPI#getPagesForSong. |
tekstowoAPI.search(query, options) ⇒ Promise.<(Object.<string, (TekstowoAPILyricsID|TekstowoAPIArtistID)>|TekstowoAPISearchResults)>
Downloads and parses search result page for specified arguments.
Kind: instance method of TekstowoAPI
Param | Type | Description |
---|---|---|
query | string |
|
options | Object |
|
options.page | number |
|
options.includePageCount | boolean |
If onlyArtists or onlySongs is true, adds undocumented property, "INTERNAL_PAGE_COUNT" (not-enumerable) with value returned by TekstowoAPI#getPagesForSong. If not, sets the pageCount property of TekstowoAPISearchResults. |
options.onlyArtists | boolean |
If true, skips extracting songs and returns only artist list. |
options.onlySongs | boolean |
If true, skips extracting artists and returns only song list. |
Deprecated
Kind: instance method of TekstowoAPI
Downloads and parses search result page and extracts pages count for specified arguments. Alternatively, if skipFetch is not empty (""), re-fetching will be skipped and it will use the supplied HTML string.
Kind: instance method of TekstowoAPI
Param | Type | Default | Description |
---|---|---|---|
query | string |
||
skipFetch | string |
||
from | number |
1 |
Debug only, don't use |
Downloads and parses search result page, then from list of results selects closest name match for specified arguments.
Kind: instance method of TekstowoAPI
Param | Type |
---|---|
artist | string |
songName | string |
Downloads, parses lyrics page and extracts "metrics" section for specified arguments. Alternatively, if useHTML is true, accepts HTML string from songIdOrHtml.
Kind: instance method of TekstowoAPI
Param | Type | Default |
---|---|---|
songIdOrHtml | TekstowoAPILyricsID | string |
|
useHTML | Boolean |
false |
tekstowoAPI.getArtistsSongList(artistId, options) ⇒ Promise.<{pageCount: number, results: Array.<KVPair.<string, TekstowoAPIArtistID>>}>
Downloads and parses artist song list
Kind: instance method of TekstowoAPI
Param | Type |
---|---|
artistId | TekstowoAPIArtistID |
options | Object |
options.page | number |
options.sortDir | string |
options.sortMode | string |
Kind: instance method of TekstowoAPI
Param | Type | Default | Description |
---|---|---|---|
internalId | string |
The post id we are pulling comments for. Can be song id, artist id. | |
offset | * |
0 |
How many comments have we already acknowledged? |
mode | * |
S |
What type is the post? 'S' for songs, 'A' for artists. |
Param | Type |
---|---|
key | K |
value | V |
Kind: global enum
Properties
Name | Type | Default |
---|---|---|
None | number |
0 |
AllOrigins | number |
1 |
SirJoshProxy | number |
2 |
Kind: global function
Param | Type |
---|---|
sortMode | string |
Kind: global function
Param | Type |
---|---|
input | string |
Kind: global function
Param | Type |
---|---|
htmlString | string |
Kind: global function
Param | Type |
---|---|
arr | Array |
Kind: global function
Param | Type |
---|---|
keys | Array |
values | Array |
findClosestString(distances) ⇒ DistanceCompareResult
Kind: global function
Param | Type |
---|---|
distances | Array.<Distance> |
levenshteinDistanceArray(strArray, targetStr) ⇒ Array.<Distance>
Kind: global function
Param | Type |
---|---|
strArray | Array.<string> |
targetStr | string |
Kind: global function
Param | Type |
---|---|
str1 | string |
str2 | string |
Kind: inner constant of levenshteinDistance
Kind: global function
Param | Type |
---|---|
jsonString | string |
Kind: global function
Param | Type |
---|---|
htmlString | string |
Kind: global function
Param | Type |
---|---|
text | string |
start | string |
end | string |
just an Object
Kind: global typedef
Properties
Name | Type |
---|---|
str | string |
distance | number |
Kind: global typedef
Properties
Name | Type |
---|---|
closestString | string |
lowestDistance | number |
Generated by awesome jsdoc-to-markdown