标签: uber-api

Uber API - 支付其他用户乘坐费用.可能?

我们正在开发一个应用程序,我们需要使用自己的信用卡支付不同用户的费用.有点优步业务,但没有手动添加帐户.Uber API有可能吗?

uber-api

5
推荐指数
1
解决办法
287
查看次数

Uber API v1.2/get/estimate/price - 它是否支持surge_multiplier?

Uber API v1.2文档 GET /estimates/price包含surge_multiplier支持定义中的含糊不清:它被声明为响应的参数之一, 但未 在响应示例中显示

此外,我检查了类似问题的答案和评论,并在那里找到了相互排斥的信息:"不应在v1.2中返回浪涌乘数." 与包含响应的示例的答案相对应surge_multiplier

那么这个端点的有效和预期行为是什么?

uber-api

5
推荐指数
1
解决办法
330
查看次数

优步API显示汽车位置

有没有办法使用优步API来实时显示汽车的位置,如优步应用程序?阅读手册似乎尚未实现此功能.

api uber-api

4
推荐指数
1
解决办法
1701
查看次数

如何"访问移动Uber网站"?移动网络的深层链接出错

我在这里关注深层链接的文档:

https://developer.uber.com/v1/deep-linking/#launching-the-uber-mobile-site

好吧,我可以打开网站,我选择登录,输入密码并按回车键,我看到了:

请下载优步应用程序或访问http://t.uber.com/support以请求访问移动优步网站.

我甚至都不知道这意味着什么.任何人都有任何想法?

uber-api

3
推荐指数
1
解决办法
5295
查看次数

要求使用Apple Pay作为付款方式的优步乘车

有没有办法通过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?

uber-api

3
推荐指数
1
解决办法
468
查看次数

运算符 != 不能应用于 double、null

我在下面的代码中遇到错误:

  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

有人能帮助我吗 ?

double null android latitude-longitude uber-api

3
推荐指数
1
解决办法
1万
查看次数

优步API iOS OAuth 2.0

我试图创建一个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

oauth ios oauth-2.0 uber-api

2
推荐指数
1
解决办法
2694
查看次数

将数据字段添加到 Ruby 中的休息客户端请求

我在使用 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)

ruby rest-client uber-api

2
推荐指数
1
解决办法
4546
查看次数

如何在node.js中的http PUT主体中使用JSON?

请参阅下面的代码.我正在尝试在我的请求正文中发送{"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)

javascript node.js http-request uber-api

2
推荐指数
1
解决办法
8731
查看次数

为什么我应该使用 uber 的 fusion.js 而不是 create-react-app?

优步表示,它带有预先配置的优化样板和基于插件的架构。基于插件的架构是否意味着它类似于 gulp?

javascript reactjs uber-api create-react-app

2
推荐指数
1
解决办法
571
查看次数