Created
December 16, 2021 14:28
-
-
Save ktskumar/286a1b6814bc354fbeb9dd2096243fa2 to your computer and use it in GitHub Desktop.
Explore JSON response from mgt-get
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<mgt-get resource="/me/drive" version="v1.0" scopes="file.read" max-pages="2"> | |
<template> | |
<div class="objcontainer" data-for="{{a in Object.keys(this)}}"> | |
<div class="key">{{a}}</div> | |
<div data-if="{{typeof(this[a]) != 'object'}}" class="value">{{this[a]}} </div> | |
<div data-else class="value"> | |
<div data-for="{{b in Object.keys(this[a])}}"> | |
<div class="key">{{b}}</div> | |
<div class="value">{{this[a][b]}}</div> | |
</div> | |
</div> | |
</template> | |
<template data-type="loading"> | |
loading | |
</template> | |
<template data-type="error"> | |
{{ this }} | |
</template> | |
</mgt-get> | |
<style> | |
.objcontainer{ | |
background-color:#eee; | |
margin-top:15px; | |
font-size:12px; | |
box-shadow: rgba(0, 0, 0, 0.02) 0px 1px 3px 0px, rgba(27, 31, 35, 0.15) 0px 0px 0px 1px; | |
} | |
.objcontainer:hover{ | |
box-shadow: rgba(60, 64, 67, 0.3) 0px 1px 2px 0px, rgba(60, 64, 67, 0.15) 0px 2px 6px 2px; | |
} | |
.key{ | |
background-color: #aaa; | |
padding:10px 0px 5px 10px; | |
text-transform:uppercase; | |
border:1px solid #aaa; | |
font-weight: bold; | |
} | |
.value{ | |
padding:5px 0px 5px 5px; | |
} | |
</style> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment