0
您好,我正在使用STRAVA api和一個由它構建的gem。我試圖做的命令是:cURL to Rails「-d」格式轉換
$ curl -G https://www.strava.com/api/v3/segments/explore \
-H "Authorization: Bearer 83ebeabdec09f6670863766f792ead24d61fe3f9" \
-d bounds=37.821362,-122.505373,37.842038,-122.465977 \
如何格式化我的ruby on rails命令以發出請求。目前:
@client.segment_explorer([37.821362,-122.505373,37.842038,-122.465977])
的API寶石的源代碼如下所示:
def segment_explorer(args = {}, options = {}, &block)
# Fetches the connections for given object.
api_call('segments/explore', args, 'get', options, &block)
end
我將如何通過「-d」作爲經度這個方法成功創建API調用?