(user_id, callback, options)
| 331 | } |
| 332 | |
| 333 | function recommendations(user_id, callback, options) { |
| 334 | var o = options || {}; |
| 335 | return recommendationsFor(user_id, function (response) { |
| 336 | var recommendations_list = [], |
| 337 | cohort = "-"; |
| 338 | if ((response !== null) && (response !== undefined) && (response.error_id === undefined)) { |
| 339 | if (response.list) { |
| 340 | recommendations_list = response.list; |
| 341 | } else { |
| 342 | recommendations_list = response.recommendedItems; |
| 343 | cohort = response.cohort; |
| 344 | } |
| 345 | |
| 346 | if (o.appendClick) { |
| 347 | appendClickTo(recommendations_list, options); |
| 348 | } |
| 349 | } |
| 350 | callback({recs: recommendations_list, cohort: cohort}); |
| 351 | }, o); |
| 352 | } |
| 353 | |
| 354 | return { |
| 355 | init: function (overrides) { |
nothing calls this directly
no test coverage detected