Closed shernshiou closed 9 years ago
Agree!
I started this module, Request.js with this code:
function Products(uber) {
this._uber = uber;
this.path = 'requests';
}
module.exports = Products;
Products.prototype.requestRide = function (query, callback) {
console.log('Making request. Query='+JSON.stringify(query));
if (!query.start_latitude || !query.start_longitude || !query.product_id ) {
return callback(new Error('Invalid parameters [REQUESTS]'));
}
var accessToken = this._uber.access_token;
return this._uber.get({
url: this.path,
params: query,
access_token: accessToken,
}, callback);
return this._uber.get({ url: this.path, params: query }, callback);
};
The issue now is w/ auth permissions. I keep getting (fixed. due to a bug in Ubers example python oAuth server){ message: 'Missing scope: request', code: 'unauthorized' }
. I used https://github.com/uber/Python-Sample-Application/ to get my token and included request
in it's list of scopes.
@shernshiou I have finished this story. I did not add any tests however because I don't know how to write them! Would love you to review the PR. Thank you!
Documentation