List all users who are on call

by eurica

HTML

<script src="http://eurica.github.io/pdjs/js/pdjs.js"></script>
<div id="output">Loading...</div>

JavaScript

// As always configure PDJS with your subdomain and api-key
PDJS = new PDJSobj({
    subdomain: "webdemo",
    token: "CkNpsqH9i6yTGus8VDzA",
})

PDJS.api_all({
    res: "users/on_call",
    final_success: function (json) {
        //Once we've loaded all the EP's, clear the "loading..." message:
        console.log(json)
        $("#output").html("")
        $.each(json.users, function(i,u) {
            console.log(u)
        })
    },
})