Web SDK
Initialize SDK

Initializing the Web SDK

1. Adding the HTML element to your DOM

Include an <ezyhire-render> tag in your HTML and assign it a unique ID to render a specific component from ezyhire.

The ID assigned to this element will be utilized in the renderEzyhire method.

Here's an example:

 <ezyhire-render id="example-div"></ezyhire-render>

2. The renderEzyhire method

The renderEzyhire method will display the specified component from ezyhire onto the DOM element you've designated in the configuration.

The method requires two arguments:

  1. The DOM element ID.
  2. The ezyhire configuration.
$ezyhire.renderEzyhire('example-div', ezyhireConfig)

3. The ezyhireConfig

The ezyhireConfig includes the following configurations:

  1. component (required) - Specify the component you want to render.
  2. apiKey (required) - Supply the API Key obtained from ezyhire.
  3. reportCallbackUrl (required if component is reportList) - The URL of your application where you rendered the test report component.
  4. callbacks (optional) - Utilize a list of callbacks provided by the ezyhire SDK to execute actions on various methods.

List of components available in SDK

You can pass one of this component to render in your app:

ComponentWhat it will render
testListList of ezyhire library and your custom tests. You can send test to candidate or start ezyRecruit
reportListList of tests sent by you to your candidates. You can view/download report of completed tests.
questionsListList of ezyhire library and your custom questions.
createTestCreate test form using which you can create your custom test.
createQuestionCreate question form using which you can create your custom question.
reportDetailed report of the completed test

List of callbacks available

You can use the callbacks based on your use case

CallbackWhen it will execute
sendTestCallbackWhen test is successfully sent to candidate
startRecruitProCallbackWhen recruit pro is successfully started
viewReportCallbackWhen test report is viewed by the user
dowloadReportCallbackWhen test report is downloaded by the user
viewQuestionCallbackWhen question is viewed by the user
addTemplateCallbackWhen custom test is successfully added by user
addQuestionCallbackWhen custom question is successfully added by user