CheckThatBike Global

無料
よって stolenbikes88 | 更新済み 20 дней назад | Data
人気

0 / 10

レイテンシー

127,200ms

サービスレベル

0%

Health Check

N/A

すべてのディスカッションに戻る

Missing Mashape application key

Rapid account: Richlewis 14
richlewis14
8 वर्ष पहले

Hi,

I have been trying to get a response from the api using the key generated by Mashape, i have added this api as an application and clicked Get Keys to get my appropriate key

# Ruby
response = Unirest.get "https://stolenbikes88-checkthatbike-global-v1.p.mashape.com/get.json?check=all&frame=WUD092050549E",
headers:{
  "X-Mashape-Key" => ENV['MASHAPE_BIKE_CHECK_KEY'],
  "Accept" => "application/json"
}

Each time i do this i get the message returned “Missing Mashape application key”, is there something wrong with the key generated? or could it be something else? Even if I hardcode the Key i get the same message so it’s not the ENV Var.

Also when test the endpoint within mashape (ruby) i get these errors returned followed by the response

<b>Warning</b>: Invalid argument supplied for foreach() in <b>/srv/users/serverpilot/apps/api/public/endpoints/checkers/stolenbicycleregistry.php</b> on line <b>8</b><br />
<br />
<b>Warning</b>: Cannot modify header information - headers already sent by (output started at /srv/users/serverpilot/apps/api/public/endpoints/checkers/stolenbicycleregistry.php:8) in <b>/srv/users/serverpilot/apps/api/public/api.php</b> on line <b>29</b><br />
<br />
<b>Warning</b>: Cannot modify header information - headers already sent by (output started at /srv/users/serverpilot/apps/api/public/endpoints/checkers/stolenbicycleregistry.php:8) in <b>/srv/users/serverpilot/apps/api/public/api.php</b> on line <b>30</b><br />

{"success":"1","error_number":"","error_message":"","url":"\/get.json?    check=all&frame=WUD092050549E","frame":"WUD092050549E","rating":12.5,"results":[{"checked":"Stolen Bikes UK","checkedURL":"https:\/\/stolen-bikes.co.uk\/?s=WUD092050549E","resultBoolean":1,"runningAddition":2,"message":"Stolen bike(s) found!"},{"checked":"ETA Insurance","iframe":1,"checkedURL":"\/\/checkthatbike.co.uk\/iframes\/general.php?s=WUD092050549E&source=eta","last_updated":  {"updated_human":"19th October 2014","updated_unix":"1413719683"},"resultBoolean":0,"runningAddition":0,"message":"No stolen bikes found!"} , {"checked":"Adhoc Police Data","iframe":1,"checkedURL":"\/\/checkthatbike.co.uk\/iframes\/general.php? s=WUD092050549E&source=adhocpolice","last_updated":{"updated_human":"27th January 2016","updated_unix":"1453856917"},"resultBoolean":1,"runningAddition":2,"message":"Stolen bike(s) found!"},{"checked":"Bike Shepherd","checkedURL":"http:\/\/www.bikeshepherd.org\/global_search?serial=WUD092050549E","resultBoolean":1,"runningAddition":2,"message":"Stolen bike(s) found!"},  {"checked":"Bikesecure","checkedURL":"http:\/\/www.bikesecure.co","resultBoolean":0,"runningAddition":0,"message":"No stolen bikes found!"},{"checked":"Stolen Bristol Bikes","checkedURL":"http:\/\/www.stolenbristolbikes.com\/search?q=WUD092050549E","resultBoolean":0,"runningAddition":0,"message":"No stolen bikes found!"},{"checked":"BikeIndex","checkedURL":"https:\/\/bikeindex.org\/bikes?utf8=%E2%9C%93&query=%23&proximity=Havant+England&proximity_radius=100&stolen=true&non_stolen=&non_proximity=true&serial=WUD092050549E","resultBoolean":1,"runningAddition":2,"message":"Stolen bike(s) found!"},{"checked":"Bike Registry","checkedURL":"http:\/\/www.bikeregistry.com\/stolen-bike.php","resultBoolean":0,"runningAddition":0,"message":"No stolen bikes found!"},{"checked":"Bing","checkedURL":"http:\/\/www.google.com\/search?rls=en&q=%22WUD092050549E%22+bike&ie=UTF-8&oe=UTF-8","resultBoolean":1,"runningAddition":1,"message":"Results found!"},{"checked":"CPIC","checkedURL":"http:\/\/app.cpic-cipc.ca\/English\/searchFormResultsbikes.cfm","resultBoolean":0,"runningAddition":0,"message":"No stolen bikes found!"}]}

Any help appreciated

Thanks

Rapid account: Richlewis 14
richlewis14 Commented 8 वर्ष पहले

Hi, Thanks again for resolving the error on the demo page. regarding implementation, I have found a way to get a successful response.

Using httparty you can do the following

url='https://stolenbikes88-checkthatbike-global-v1.p.mashape.com/get.json?'
query = { "check" => "all", "frame" => "WUD092050549E" }
headers = {"X-Mashape-Key" => ENV['MASHAPE_BIKE_CHECK_KEY'], "Accept"=>"application/json"}
HTTParty.get(url, :query => query, :headers => headers)
Rapid account: Stolenbikes 88
stolenbikes88 Commented 8 वर्ष पहले

The warnings where my end and are now resolved (thanks for letting me know), the mashape key I’m not so sure on sounds like something on the implementation.

If you drop me an email with what you are using it for I could give you direct access.

Rapid account: Richlewis 14
richlewis14 Commented 8 वर्ष पहले

Hi

Was wondering if there was an update with this please?

ディスカッションに参加しましょう-以下にコメントを追加してください:

ログイン/サインアップして新しいコメントを投稿