Skip to content

Commit 3a9987c

Browse files
authored
Add qualification docs (#16)
1 parent 90e74d4 commit 3a9987c

File tree

3 files changed

+78
-16
lines changed

3 files changed

+78
-16
lines changed

docs/.vitepress/config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ export default {
6161
items: [
6262
{ text: 'Roster', link: '/external-integration/widgets/roster' },
6363
{ text: 'Awards', link: '/external-integration/widgets/awards' },
64+
{ text: 'Qualifications', link: '/external-integration/widgets/qualifications' },
6465
{ text: 'Ranks', link: '/external-integration/widgets/ranks' }
6566
]
6667
}

docs/external-integration/widgets.md

Lines changed: 51 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,12 @@
11
# Widgets
22

33
PERSCOM.io offers powerful widgets that allow the integration of your organizational data into another website for display. Each widget is a
4-
a snippet of HTML that can be injected into your website.
5-
6-
<!-- prettier-ignore -->
7-
::: info
8-
Each widget integration requires your PERSCOM ID and the use of an API key with the `access:widget` scope assigned. Your
9-
PERSCOM ID can be found under the general settings of your Dashboard.
10-
:::
4+
snippet of HTML that can be injected into your website.
115

126
## Choosing The Widget
137

148
Each widget uses the same HTML code snippet to display the data. However, to set which widget you would like outputted, you must set the
15-
`data-widget` attribute to the intended widget. The available options are listed below.
9+
`data-widget` attribute to the intended Widget ID. The available options are listed below.
1610

1711
```html
1812
<div id="perscom_widget_wrapper">
@@ -29,11 +23,12 @@ Each widget uses the same HTML code snippet to display the data. However, to set
2923

3024
## Available Widgets
3125

32-
The following widgets are currently available.
26+
The following widgets are currently available. Each widget is identified by a Widget ID that is passed to the `data-widget` attribute.
3327

3428
1. [Roster](/external-integration/widgets/roster) `data-widget='roster'`
3529
2. [Awards](/external-integration/widgets/awards) `data-widget='awards'`
36-
3. [Ranks](/external-integration/widgets/ranks) `data-widget='ranks'`
30+
3. [Qualifications](/external-integration/widgets/qualifications) `data-widget='qualifications'`
31+
4. [Ranks](/external-integration/widgets/ranks) `data-widget='ranks'`
3732

3833
## Authentication and Authorization
3934

@@ -48,6 +43,49 @@ authentication error when viewing the widget.
4843

4944
Click [here](/external-integration/api) for more documentation on the API.
5045

46+
<!-- prettier-ignore -->
47+
::: info
48+
Each widget integration requires your PERSCOM ID and the use of an API key with the `access:widget` scope assigned. Your
49+
PERSCOM ID can be found under the general settings of your Dashboard.
50+
:::
51+
52+
## Options
53+
54+
The widget accepts several options to customize the output of the data.
55+
56+
#### API Key (required)
57+
58+
```html
59+
data-apikey="xxx"
60+
```
61+
62+
The API key used to authenticate the request.
63+
64+
#### Limit
65+
66+
```html
67+
data-limit="10"
68+
```
69+
70+
Adding the limit option will control how many results are returned from the widget. By default, the widget will return 15 results. When more
71+
than 15 results are present, the table will be presented with a pagination option. Increase or decrease the limit to fit your website needs.
72+
73+
#### PERSCOM ID (required)
74+
75+
```html
76+
data-perscomid="xxx"
77+
```
78+
79+
The ID of your PERSCOM account used to authenticate the request.
80+
81+
#### Widget ID (required)
82+
83+
```html
84+
data-widget="[roster|awards|qualifications|ranks]"
85+
```
86+
87+
The ID of the [widget](#available-widgets) you would like to output.
88+
5189
## Customization
5290

5391
The widgets are embedded within an `iframe` HTML element that prevents the host website from overriding and altering the styling of the
@@ -84,12 +122,9 @@ the code snippet for it to take affect.
84122
The PERSCOM.io widget can be accessed outside of the HTML code snippet that you used to post within your website. To see your widget live,
85123
without embedding it in a website, you can visit the URL's below. Make sure to set APIKEY and PERSCOMID to the correct values.
86124

87-
Roster:
88-
[https://widget.perscom.io/roster?apikey=APIKEY&perscomid=PERSCOMID](https://widget.perscom.io/roster?apikey=APIKEY&perscomid=PERSCOMID)
89-
Awards:
90-
[https://widget.perscom.io/awards?apikey=APIKEY&perscomid=PERSCOMID](https://widget.perscom.io/awards?apikey=APIKEY&perscomid=PERSCOMID)
91-
Ranks:
92-
[https://widget.perscom.io/ranks?apikey=APIKEY&perscomid=PERSCOMID](https://widget.perscom.io/ranks?apikey=APIKEY&perscomid=PERSCOMID)
125+
```html
126+
https://widget.perscom.io/{widgetId}?apikey={apiKey}&perscomid={perscomId}
127+
```
93128

94129
## Development
95130

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Qualifications Widget
2+
3+
The qualifications widget outputs a table-based list of your qualifications as they are in your Dashboard.
4+
5+
## Code Snippet
6+
7+
<!-- prettier-ignore -->
8+
::: info
9+
Make sure to replace APIKEY and PERSCOMID with the appropriate values.
10+
:::
11+
12+
```html
13+
<!-- Place the code block where you would like the widget displayed on your website. !-->
14+
<!-- Replace APIKEY and PERSCOMID with your API key with the ‘access:widget' scope and PERSCOM ID, respectively. !-->
15+
16+
<div id="perscom_widget_wrapper">
17+
<script
18+
id="perscom_widget"
19+
data-perscomid="PERSCOMID"
20+
data-apikey="APIKEY"
21+
data-widget="qualifications"
22+
src="https://widget.perscom.io/widget.js"
23+
type="text/javascript"
24+
></script>
25+
</div>
26+
```

0 commit comments

Comments
 (0)