Skip to main content

Initialization

To initialize phishing-api you need to use a constructor. Learn more about them here

Why a constructor?

The constructor checks if the API is online to avoid any future headaches.

Actual steps

  1. Import the package
const PhishingAPI = require("phishing-api")
  1. Create a variable (or constant) with the imported PhishingAPI class
const PhishingAPI = require("phishing-api")

let phish = new PhishingAPI()

Now you're done, hooray!