new Scholarcheck(apiKey)
Constructor for the Scholarcheck module.
Parameters:
| Name |
Type |
Description |
apiKey |
string
|
ScholarCheck.io API key |
- Source:
Methods
_apiCall(endpoint, callback)
Internal API call method that returns raw data from an endpoint.
Parameters:
| Name |
Type |
Description |
endpoint |
string
|
The endpoint to use in the request. |
callback |
Scholarcheck~apiCallback
|
A callback to handle the returned data. |
- Source:
institution(email, cb)
Returns the institution name in the callback if the email is a valid institutional email.
Parameters:
- Source:
rawData(email, cb)
Returns the raw data from the email endpoint.
Parameters:
| Name |
Type |
Description |
email |
string
|
An email to test for validity |
cb |
Scholarcheck~rawCallback
|
Calback that returns the raw data. |
- Source:
valid(email, cb)
Returns true in the callback if the email is a valid institutional email.
Parameters:
- Source:
Type Definitions
apiCallback(err, data)
Parameters:
| Name |
Type |
Description |
err |
string
|
Any error that occured. Otherwise null. |
data |
object
|
Raw API data returned. |
- Source:
institutionCallback(err, institution)
Parameters:
| Name |
Type |
Description |
err |
string
|
Any error that occured. Otherwise null. |
institution |
string
|
True if email is institutional, otherwise false. |
- Source:
rawCallback(err, data)
Parameters:
| Name |
Type |
Description |
err |
string
|
Any error that occured. Otherwise null. |
data |
object
|
Raw API data returned. |
- Source:
validCallback(err, valid)
Parameters:
| Name |
Type |
Description |
err |
string
|
Any error that occured. Otherwise null. |
valid |
boolean
|
True if email is institutional, otherwise false. |
- Source: