Skip to content
This repository has been archived by the owner on Jan 9, 2022. It is now read-only.

Commit

Permalink
added updateMetricV2
Browse files Browse the repository at this point in the history
  • Loading branch information
Colin Loretz committed Feb 12, 2015
1 parent baf917d commit 10ff0de
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions numerous.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,13 @@ Numerous.prototype.updateMetric = function(metric, callback) {
self.makeRequest("PUT", self.url + '/metrics/' + metricId, metric, callback);
}

Numerous.prototype.updateMetricV2 = function(metric, callback) {
var self = this;
var metricData = JSON.parse(metric);
var metricId = metricData.id
self.makeRequest("PUT", "https://api.numerousapp.com/v2/metrics/" + metricId, metric, callback);
}

Numerous.prototype.addMetricPhotoByUrl = function(metricId, photoURL, callback) {
var self = this;
var formData = { image : request(photoURL) };
Expand Down

0 comments on commit 10ff0de

Please sign in to comment.