(type, callback, user_id, item_id, rlabs, source, rectag, pos, click_only, extra_data)
| 207 | } |
| 208 | |
| 209 | function addAction(type, callback, user_id, item_id, rlabs, source, rectag, pos, click_only, extra_data) { |
| 210 | return withMandatory("user_id", user_id, function () { |
| 211 | var urlparams = retrieveSeldonParamsFromURL(), |
| 212 | id = item_id || currentPageId(params.retain), |
| 213 | recId = rlabs || urlparams[0], |
| 214 | tag = rectag || extractExtraSeldonParams(urlparams).rt, |
| 215 | position = pos || extractExtraSeldonParams(urlparams).p, |
| 216 | url; |
| 217 | |
| 218 | extra_data = ((typeof extra_data) === 'object') ? JSON.stringify(extra_data) : extra_data; // check if extra_data is an object, so will need to be stringified |
| 219 | url = actionUrl(type, user_id, id, recId, source, tag, position, click_only, extra_data); |
| 220 | jsonpCall(url, callback); |
| 221 | }); |
| 222 | } |
| 223 | |
| 224 | function recommendedUsers(user_id, item_id, callback) { |
| 225 | return withMandatory("user_id", user_id, function () { |
nothing calls this directly
no test coverage detected