For Developers

Public Data Browse Widget

The public data browse plugin embeds a searchable table into your site which allows a user to search for a institution or company via the Edlink Public Data API. They can then select an entity which you can use however you please.

Some examples of use cases are:

  • Eliminate duplicate organizations in your system
  • Enrich and improve your reporting
  • Group freemium users by organization

Edlink ourselves have needed and used this to help schools onboard. It can be easier and quicker to simply search for your school and prevents duplicate signups across that orginization.

Public Data Search Plugin Preview
Public Data Search Plugin Preview

Usage

1. Installation

First add the Widgets SDK script to your website. You can do this by adding the following script tag to your website:

<script src="https://ed.link/widgets/edlink@1.0.0.js"></script>

2. Initialization

Then initialize the SDK.

Make sure you provide a publishable key. This is required to use the Public Data API.

You can create a publishable key for your application in the dashboard.

const edlink = new Edlink({
    client_id: '00000000-0000-0000-0000-000000000000',
    publishable_key: 'pk_...',
    colors: {
        primary: '#52c75b',
        primary_foreground: '#ffffff'
    }
});

Next create a widget instance with a root for the widget to mount to.

const widget = edlink.createWidget({
    root: document.getElementById('edlink-widget-root'),
});

3. Activation

Activate the plugin like so:

widget.activatePlugin({
    name: 'public_data_browse',
    options: {
        type: 'institution',    // 'institution' | 'company'
    }
});

The widget will automatically appear because it is attached to a root element. No need to call show().

This widget will resize itself to fit its contents. It will set a fixed height on its iframe but you are welcome to constrain it with the root however you like. We reccomend placing it in an element that is free to resize in the y-axis.