nodewikiaapi

Tutorial: Migration guide (3.x)

Migration guide (3.x)

The following page lists BREAKING CHANGES between versions 2.x and 3.x of the library alongside any possible workarounds.

If any of the changes make you unable to use the library, you can install version 2.x which had all of the security vulnerabilities patched as of the day of the release of version 3.0.0.

Importing

The library is now exported as ESM instead of CJS. See more information here.

Removed endpoints

These endpoints were removed following the UCP, with no information on whether they will be made available again in the future. Thus they were also removed from the wrapper library. You should no longer depend on those methods.

  • Activity
    • LatestActivity (getLatestActivity())
    • RecentlyChangedArticles (getRecentlyChangedArticles())
  • Articles
    • AsSimpleJson (getArticleAsSimpleJson())
    • MostLinked (getMostLinked())
    • MostLinked?expand=1 (getMostLinkedExpanded())
    • New (getNewArticles())
    • Popular (getPopularArticles())
    • Popular?expand=1 (getPopularArticlesExpanded())
    • List?expand=1 (getArticlesListExpanded())
    • Top?expand=1 (getTopArticlesExpanded())
  • Navigation
    • Data (getNavigationData())
  • RelatedPages
    • List (getRelatedPages())
  • Search
    • List (getSearchList())

Removed members

  • WikiaAPI.wikiaapiurl static member has been removed as the subdomain is now required
  • WikiaAPI.wikiurl instance member has been removed as the subdomain is now required
  • WikiaAPI.wikiaurl static member has been removed as the subdomain is now required

Renames

Parameter changes

Other changes

  • WikiaAPI.apiBasepath (formerly wikiapiurl) now:
    • returns an extra trailing slash
    • uses https:// instead of http://
    • uses fandom.com instead of wikia.com
  • WikiaAPI's methods starting with an underscore are now marked as @private, their use was never recommended or documented, but it is now prohibited by TypeScript
  • The underlying HTTP client is now fetch instead of got
  • The API is now limited to maximally two concurrent data connections at any point in time