Constructor
new WikiaAPI(subdomain, languageopt)
Parameters
-
subdomain
string
Subdomain, for example "dev" for "dev.fandom.com"
-
language
string
<optional>
Optional language code, for example "pl" for "leagueoflegends.fandom.com/pl"
Tutorials
Source
Members
apiBasepathstring
Basepath of Wikia API V1 for the given subdomain and language, for example "http://dev.fandom.com/api/v1/".
Type
-
string
Source
languagestring|null
Language code, for example "pl" for "leagueoflegends.fandom.com/pl".
Type
-
string
|null
Source
subdomainstring
Subdomain, for example "dev" for "dev.fandom.com".
Type
-
string
Source
Methods
getArticleDetails(request) → {Promise.<ArticleDetailsRes>}
Get details about one or more articles.
Parameters
-
request
ArticleDetailsReq
Request parameters
Returns
-
Promise.<ArticleDetailsRes>
Source
getArticleList(requestopt) → {Promise.<ArticleListRes>}
Get article list in alphabetical order.
Parameters
-
request
ArticleListReq
<optional>
Optional request parameters
Returns
-
Promise.<ArticleListRes>
Source
getSearchSuggestions(query) → {Promise.<SearchSuggestionsRes>}
Find suggested phrases for chosen query.
Parameters
-
query
string
Search query
Returns
-
Promise.<SearchSuggestionsRes>
Source
getTopArticles(requestopt) → {Promise.<TopArticlesRes>}
Get the most viewed articles from this wiki.
Parameters
-
request
TopArticlesReq
<optional>
Optional request parameters
Returns
-
Promise.<TopArticlesRes>
Source
getUserDetails(request) → {Promise.<UserDetailsRes>}
Get details about selected users.
Parameters
-
request
UserDetailsReq
Request parameters
Returns
-
Promise.<UserDetailsRes>
Source
getWikiVariables() → {Promise.<WikiVariablesRes>}
Get wiki data, including key values, navigation data and more.
See
Returns
-
Promise.<WikiVariablesRes>