Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

strava-v3

Package Overview
Dependencies
Maintainers
2
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

strava-v3 - npm Package Compare versions

Comparing version 2.0.1 to 2.0.2

.drone.yml

28

lib/httpClient.js

@@ -6,3 +6,2 @@ /* eslint camelcase: 0 */

const rateLimiting = require('./rateLimiting')
const request = require('request-promise')

@@ -103,10 +102,10 @@ // request.debug = true

//= ==== postUpload =====
HttpClient.prototype.postUpload = function (args, done) {
if (!args) {
args = {}
}
HttpClient.prototype.postUpload = function (args = {}, done) {
var options = {
url: 'uploads',
method: 'POST'
method: 'POST',
formData: {
...args.formData,
file: fs.createReadStream(args.file)
}
}

@@ -118,13 +117,3 @@

var req = request.post(options, function (err, httpResponse, payload) {
done(err, payload)
})
var form = req.form()
// append the rest of the formData values
for (var key in args.formData) {
form.append(key, args.formData[key])
}
form.append('file', fs.createReadStream(args.file))
return Promise.resolve(this.request.post(options)).asCallback(done)
}

@@ -205,3 +194,4 @@

return Promise.resolve(response.body)
}).asCallback(callback)
})
.asCallback(callback)
}

@@ -208,0 +198,0 @@

var uploads = function (client) {
this.client = this
this.client = client
}

@@ -14,3 +14,3 @@

uploads.post = function (args, done) {
uploads.prototype.post = function (args, done) {
var self = this

@@ -46,3 +46,3 @@

uploads._check = function (args, cb) {
uploads.prototype._check = function (args, cb) {
var endpoint = 'uploads'

@@ -66,3 +66,3 @@ var self = this

uploads._uploadIsDone = function (args) {
uploads.prototype._uploadIsDone = function (args) {
var isDone = false

@@ -69,0 +69,0 @@

{
"name": "strava-v3",
"version": "2.0.1",
"version": "2.0.2",
"description": "Simple wrapper for strava v3 api",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -417,2 +417,3 @@

Currently Maintained by Mark Stosberg <mark@rideamigos.com>
Currently Maintained by Mark Stosberg <mark@rideamigos.com>

@@ -76,3 +76,3 @@ const should = require('should')

.post(/^\/oauth\/token/)
.reply(200, [
.reply(200,
{

@@ -85,3 +85,3 @@ 'access_token': '38c8348fc7f988c39d6f19cf8ffb17ab05322152',

}
])
)
})

@@ -91,3 +91,3 @@ it('should return expected response when refreshing token', () => {

.then(result => {
result.should.eql([
result.should.eql(
{

@@ -100,3 +100,3 @@ 'access_token': '38c8348fc7f988c39d6f19cf8ffb17ab05322152',

}
])
)
})

@@ -103,0 +103,0 @@ })

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc