11# Widgets
22
33PERSCOM.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
148Each 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
34281 . [ Roster] ( /external-integration/widgets/roster ) ` data-widget='roster' `
35292 . [ 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
4944Click [ 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
5391The 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.
84122The 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,
85123without 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
0 commit comments