build/tincan.js
function (cfg) {
            this.log("retrieveActivityProfileIds");
            var requestCfg,
                requestHeaders,
                requestResult,
                callbackWrapper;

            cfg = cfg || {};
            requestHeaders = cfg.requestHeaders || {};

            requestCfg = {
                url: "activities/profile",
                method: "GET",
                params: {
                    activityId: cfg.activity.id
                },
                headers: requestHeaders,
                ignore404: true
            };
            if (typeof cfg.callback !== "undefined") {
                callbackWrapper = function (err, xhr) {
                    var result = xhr;

                    if (err !== null) {
                        cfg.callback(err, result);
                        return;
                    }

                    if (xhr.status === 404) {
                        result = [];
                    }
                    else {
                        try {
                            result = JSON.parse(xhr.responseText);
                        }
                        catch (ex) {
                            err = "Response JSON parse error: " + ex;
                        }
                    }

                    cfg.callback(err, result);
                };
                requestCfg.callback = callbackWrapper;
            }
            if (typeof cfg.since !== "undefined") {
                requestCfg.params.since = cfg.since;
            }

            requestResult = this.sendRequest(requestCfg);
            if (! callbackWrapper) {
                requestResult.profileIds = null;
                if (requestResult.err !== null) {
                    return requestResult;
                }

                if (requestResult.xhr.status === 404) {
                    requestResult.profileIds = [];
                }
                else {
                    try {
                        requestResult.profileIds = JSON.parse(requestResult.xhr.responseText);
                    }
                    catch (ex) {
                        requestResult.err = "retrieveActivityProfileIds - JSON parse error: " + ex;
                    }
                }
            }
            return requestResult;
        }
function (cfg) {
            this.log("retrieveActivityProfileIds");
            var requestCfg,
                requestHeaders,
                requestResult,
                callbackWrapper;

            cfg = cfg || {};
            requestHeaders = cfg.requestHeaders || {};

            requestCfg = {
                url: "activities/profile",
                method: "GET",
                params: {
                    activityId: cfg.activity.id
                },
                headers: requestHeaders,
                ignore404: true
            };
            if (typeof cfg.callback !== "undefined") {
                callbackWrapper = function (err, xhr) {
                    var result = xhr;

                    if (err !== null) {
                        cfg.callback(err, result);
                        return;
                    }

                    if (xhr.status === 404) {
                        result = [];
                    }
                    else {
                        try {
                            result = JSON.parse(xhr.responseText);
                        }
                        catch (ex) {
                            err = "Response JSON parse error: " + ex;
                        }
                    }

                    cfg.callback(err, result);
                };
                requestCfg.callback = callbackWrapper;
            }
            if (typeof cfg.since !== "undefined") {
                requestCfg.params.since = cfg.since;
            }

            requestResult = this.sendRequest(requestCfg);
            if (! callbackWrapper) {
                requestResult.profileIds = null;
                if (requestResult.err !== null) {
                    return requestResult;
                }

                if (requestResult.xhr.status === 404) {
                    requestResult.profileIds = [];
                }
                else {
                    try {
                        requestResult.profileIds = JSON.parse(requestResult.xhr.responseText);
                    }
                    catch (ex) {
                        requestResult.err = "retrieveActivityProfileIds - JSON parse error: " + ex;
                    }
                }
            }
            return requestResult;
        }
function ( cfg ) { this . log ( "retrieveActivityProfileIds" ) ; var requestCfg , requestHeaders , requestResult , callbackWrapper ; cfg = cfg || { } ; requestHeaders = cfg . requestHeaders || { } ; requestCfg = { url : "activities/profile" , method : "GET" , params : { activityId : cfg . activity . id } , headers : requestHeaders , ignore404 : true } ; if ( typeof cfg . callback !== "undefined" ) { callbackWrapper = function ( err , xhr ) { var result = xhr ; if ( err !== null ) { cfg . callback ( err , result ) ; return ; } if ( xhr . status === 404 ) { result = [ ] ; } else { try { result = JSON . parse ( xhr . responseText ) ; } catch ( ex ) { err = "Response JSON parse error: " + ex ; } } cfg . callback ( err , result ) ; } ; requestCfg . callback = callbackWrapper ; } if ( typeof cfg . since !== "undefined" ) { requestCfg . params . since = cfg . since ; } requestResult = this . sendRequest ( requestCfg ) ; if ( ! callbackWrapper ) { requestResult . profileIds = null ; if ( requestResult . err !== null ) { return requestResult ; } if ( requestResult . xhr . status === 404 ) { requestResult . profileIds = [ ] ; } else { try { requestResult . profileIds = JSON . parse ( requestResult . xhr . responseText ) ; } catch ( ex ) { requestResult . err = "retrieveActivityProfileIds - JSON parse error: " + ex ; } } } return requestResult ; }
Retrieve the list of IDs for an activity profile, when used from a browser sends to the endpoint using the RESTful interface.

@method retrieveActivityProfileIds
@param {Object} cfg Configuration options
@param {TinCan.Activity} cfg.activity Activity in document identifier
@param {Function} [cfg.callback] Callback to execute on completion
@param {String} [cfg.since] Match activity profiles saved since given timestamp
@param {Object} [cfg.requestHeaders] Optional object containing additional headers to add to request
@return {Array} List of ids for this Activity profile
Retrieve the list of IDs for an activity profile when used from a browser sends to the endpoint using the RESTful interface .