Esempio n. 1
0
/**
 *  Increment the love counter for an identifier.
 */
function show(id, cb) {
  var opts = {
    url: this.opts.api + '/quote/' + id + '/love',
    json: true,
    method: 'POST'
  };
  $.request(opts, onResponse.bind(this, cb));
}
Esempio n. 2
0
/**
 *  Load the love counters for an array of identifiers.
 */
function load(ids, cb) {

  var opts = {
    url: this.opts.api + '/quote/love',
    method: 'POST',
    json: true,
    body: ids
  };

  $.request(opts, onResponse.bind(this, cb));
}