Data Providers
...
MS Graph
Graph Insights
Get item trending
6min
Get insights that include a list of documents trending around the user using a GET REST function and display the list in a list .
Resource links:
Required OAuth scope (least to most privilege):
Sites.Read.All Sites.ReadWrite.All
![Insights - trending Insights - trending](https://images.archbee.com/x7vdIDH6-ScTprfmi2XXX/p9BeCoKBDXDxGNvlXA4j1_graph-trending.png?format=webp)
Insights - trending
index.jigx
1name: ms-graph-demonstrator
2title: MS Graph Demonstrator
3description: A sample solution that uses the Microsoft Graph API. You can deploy and use this solution without any additional configuration.
4category: business
5widgets:
6 - size: 2x2 # choose size of the widget on the home hub
7 jigId: view-user-jigx
8 - size: "4x2"
9 jigId: items-trending
10
MS Graph list trending function in GitHub.
get-calendar-list.jigx
1provider: DATA_PROVIDER_REST
2method: GET
3url: https://graph.microsoft.com/v1.0/me/insights/trending
4outputTransform: $.value
5useLocalCall: true
6parameters:
7 accessToken:
8 location: header
9 required: true
10 type: string
11 value: microsoft.OAuth #Use manage.jigx.com to define credentials for your solution
12 $top:
13 type: string
14 location: query
15 required: false
16 value: 100
17continuation:
18 when: =$.nextLink
19 url: =$.nextLink
20 parameters:
21 accessToken:
22 location: header
23 required: true
24 type: string
25 value: microsoft.OAuth
MS Graph list trending s in GitHub.
view-calendar-list.jigx
view-trending-object-pdf.jigx
view-trending-object.jigx
1title: Items Trending
2type: jig.default
3
4header:
5 type: component.jig-header
6 options:
7 height: small
8 children:
9 type: component.image
10 options:
11 source:
12 uri: https://www.windowslatest.com/wp-content/uploads/2018/12/Office-apps-new-icons.jpg
13
14onRefresh:
15 type: action.action-list
16 options:
17 actions:
18 - type: action.sync-entities
19 options:
20 provider: DATA_PROVIDER_REST
21 entities:
22 - entity: items-trending
23 function: get-items-trending
24 functionParameters:
25 accessToken: microsoft.OAuth
26
27datasources:
28 mydata:
29 type: datasource.sqlite
30 options:
31 provider: DATA_PROVIDER_LOCAL
32
33 entities:
34 - entity: items-trending
35
36 query: SELECT id, '$.weight',
37 json_extract(Data, '$.resourceReference.webUrl') as webUrl,
38 json_extract(Data, '$.resourceVisualization.containerDisplayName') as containerDisplayName,
39 json_extract(Data, '$.resourceVisualization.previewText') as previewText,
40 json_extract(Data, '$.resourceVisualization.title') as title,
41 json_extract(Data, '$.resourceVisualization.type') as type
42 FROM [items-trending]
43 order by '$.weight' desc
44
45children:
46 - type: component.list
47 options:
48 data: [email protected]
49 maximumItemsToRender: =$count(@ctx.datasources.mydata)
50 item:
51 type: component.list-item
52 options:
53 title: [email protected]
54 subtitle: |
55 ="Relevance: " & $round((@ctx.current.item.weight * 100),2) & "%"
56 description: [email protected]
57 divider: solid
58 leftElement:
59 element: icon
60 icon: gauge-dashboard
61 label:
62 title: [email protected]
63 onPress:
64 type: action.go-to
65 options:
66 linkTo: [email protected]='pdf'? 'view-trending-object-pdf':'view-trending-object'
67 parameters:
68 uri: [email protected]
69
70widgets:
71 "4x2":
72 type: widget.group
73 options:
74 children:
75 - type: widget.image
76 options:
77 isContentOverlaid: true
78 bottom:
79 type: component.titles
80 options:
81 align: center
82 subtitle: =$count(@ctx.datasources.mydata) & " items trending around you."
83 source:
84 uri: https://www.windowslatest.com/wp-content/uploads/2018/12/Office-apps-new-icons.jpg
85 - type: widget.list
86 options:
87 data: [email protected]
88 item:
89 type: component.list-item
90 options:
91 title: [email protected]
92 subtitle: [email protected] & " document"
93 description: [email protected]
94 divider: solid
95 onPress:
96 type: action.go-to
97 options:
98 linkTo: [email protected]='pdf'? 'view-trending-object-pdf':'view-trending-object'
99 parameters:
100 uri: [email protected]
101
Updated 06 May 2024
![Doc contributor](https://s3.amazonaws.com/archbee-animals/rabbit.png)
Did this page help you?