我们正在开发一个应用程序,我们需要使用自己的信用卡支付不同用户的费用.有点优步业务,但没有手动添加帐户.Uber API有可能吗?
Uber API v1.2文档 GET /estimates/price包含surge_multiplier支持定义中的含糊不清:它被声明为响应的参数之一,
但未
在响应示例中显示
此外,我检查了类似问题的答案和评论,并在那里找到了相互排斥的信息:"不应在v1.2中返回浪涌乘数." 与包含响应的示例的答案相对应surge_multiplier
那么这个端点的有效和预期行为是什么?
我在这里关注深层链接的文档:
https://developer.uber.com/v1/deep-linking/#launching-the-uber-mobile-site
好吧,我可以打开网站,我选择登录,输入密码并按回车键,我看到了:
请下载优步应用程序或访问http://t.uber.com/support以请求访问移动优步网站.
我甚至都不知道这意味着什么.任何人都有任何想法?
有没有办法通过Apple Pay支付Uber乘坐其他API作为付款方式?
目前,在请求乘坐时设置Apple Pay(payment_method_id,https://developer.uber.com/docs/riders/references/api/v1.2/payment-methods-get)失败.
有没有办法访问Uber托管的Web视图,允许用户通过Touch ID授权付款并使用Apple pay?
我在下面的代码中遇到错误:
HashMap map = new HashMap();
map.put("driver", userId);
map.put("customer", customerId);
map.put("rating", 0);
map.put("timestamp", getCurrentTimestamp());
map.put("destination", destination);
map.put("location/from/lat", pickupLatLng.latitude);
map.put("location/from/lng", pickupLatLng.longitude);
map.put("location/to/lat", destinationLatLng.latitude);
map.put("location/to/lng", destinationLatLng.longitude);
map.put("distance", rideDistance);
historyRef.child(requestId).updateChildren(map);
Run Code Online (Sandbox Code Playgroud)
他们说要添加:
在创建 hashMap 之前或针对每个纬度和经度执行if(pickupLatLng.latitude != null &&pickupLatLng.longitude != null && destinationLatLng.latitude != null && destinationLatLng.longitude != null) 。
但是当我尝试这个时,我收到以下错误:operator !=无法应用于 double, null
有人能帮助我吗 ?
我试图创建一个iOS,它将使用优步API来做一些事情,比如获取游乐设施和什么不是.我试图在iPhone上实现OAuth 2.0而不使用任何服务器端帮助.
那可能吗?有没有人这样做过?
以下是一些参考:
优步认证:https://developer.uber.com/v1/auth/
Oauth 2.0:https://aaronparecki.com/articles/2012/07/29/1/oauth2-simplified
我在使用 rest-client gem 向 uber api 发出请求时遇到问题。我认为问题在于我试图将所需的信息作为 url 中的参数而不是数据字段传递。示例 curl 请求在 之后具有该参数-d,但我不知道如何使用 rest-client 实现它。谢谢您的帮助。
此请求在控制台中工作:
curl -v -H "Authorization: Bearer " + session[:request_token] \
-H "Content-Type: application/json" -X POST -d \ '{"start_latitude":"37.334381","start_longitude":"-121.89432","end_latitude":"37.77703","end_longitude":"-122.419571","product_id":"a1111c8c-c720-46c3-8534-2fcdd730040d"}' \
https://sandbox-api.uber.com/v1/requests
Run Code Online (Sandbox Code Playgroud)
来自我的控制器的请求得到 406 错误,不可接受的响应。
@uber_ride = JSON.load(RestClient::Request.execute(
:method => :post,
:url => "https://sandbox-api.uber.com/v1/sandbox/requests/product_id=#{@uberx_id}?start_latitude=#{lat_start}&start_longitude=#{lng_start}&end_latitude=#{lat_end}&end_longitude=#{lng_end}",
:headers => {'Authorization' => 'Bearer ' + session[:request_token], 'content_type' => 'application/json'}
))
Run Code Online (Sandbox Code Playgroud)
我尝试添加一个额外的字段,data但会出现 404 Resource Not Found 错误。
@uber_ride = JSON.load(RestClient::Request.execute(
:method => :post,
:url => "https://sandbox-api.uber.com/v1/sandbox/requests/",
:data => {'start_latitude' …Run Code Online (Sandbox Code Playgroud) 请参阅下面的代码.我正在尝试在我的请求正文中发送{"status":"accepted"}.我一直从API返回的错误是:
{"message":"Unable to parse JSON in request body.","code":"invalid_json"}
我可以在Swift中使这个工作,但是我正在使用带有设置的字典对象并将其序列化.我不知道如何在Node.JS中这样做.
var https = require('https')
var options = {
"host": "sandbox-api.uber.com",
"path": "/v1/sandbox/requests/" + req.body.request_id,
"method": "PUT",
"headers": {
"Authorization" : "Bearer " + req.body.bearer_token,
"Content-Type" : "application/json",
},
"body" : {
"status" : "accepted"
}
}
callback = function(response) {
var str = ''
response.on('data', function(chunk){
str += chunk
})
response.on('end', function(){
console.log(str)
})
}
https.request(options, callback).end()
Run Code Online (Sandbox Code Playgroud) 优步表示,它带有预先配置的优化样板和基于插件的架构。基于插件的架构是否意味着它类似于 gulp?
uber-api ×10
javascript ×2
android ×1
api ×1
double ×1
http-request ×1
ios ×1
node.js ×1
null ×1
oauth ×1
oauth-2.0 ×1
reactjs ×1
rest-client ×1
ruby ×1