Skip to content

Latest commit

 

History

History
50 lines (34 loc) · 1.56 KB

File metadata and controls

50 lines (34 loc) · 1.56 KB

Credly Widget

JavaScript Style Guide Travis

Setup

  1. install nodejs, v6 recommended, v4+ supported.
  2. run npm run setup to install the npm and bower dependencies
  3. add /credly_options.json to the repository
  4. run npm start to run the server, or keep npm run dev running in the background while developing.

Adding /credly_options.json

The /credly_options.json file should look like this:

{
  "headers": {
    "x-api-key": "<YOUR API KEY HERE>",
    "x-api-secret": "<YOUR API SECRET HERE>"
  }
}

Documentation

Display earned badges of a user

  • url: /user/$userId/
  • $userId: The ID of the user

View example

Display a table of who has earned what

  • url: /table/$issuerId/$badgeId
  • $issuerId: The id of the user that created the master badge
  • $badgeId: The id of the master badge itself

The master badge is a badge that everyone has.

View example

Display users that earned a specific badge

  • url: /badge-details/$issuerId/$badgeId
  • $issuerId: The id of the user that created the badge
  • $badgeId: The id of the badge itself

View example