所以我正在尝试连接到stubhub API:
但是我一直收到此错误
SocketError: Failed to open TCP connection to api.stubhub.com:443 (Hostname not known: api.stubhub.com)
任何想法是什么问题以及我将如何修复它?
这是我的代码:
stubhubapi1 = `HTTParty.get(URI.encode('https://api.stubhub.com/search/catalog/events/v3/?parking=false&status=active&fieldList=id,name,description,eventUrl,eventDateLocal,ticketInfo,imageUrl&sort=popularity&desc&allowedViewingDomain=stubhub.co.uk&q=' + row.eventname + '&date=' + row.date.strftime('%Y-%m-%d') + ' TO ' + date.strftime("%Y-%m-%d") + ''), headers: {"Authorization" => "Bearer API KEY HERE"}).parsed_response`