Hello team,
Please help me to create new yahoo weather API and help to Create a proxy to find sunset time for a given city
The city name should be passed in request url. (Ex: http://myproxyurl.com/sunset/city/Bangalore)
Solved! Go to Solution.
Hi @pratheek hipparagi, PFA proxy for your reference. I have tried to cover most of the point,
org-env.apigee.net/weather/v1?format=json&city=Hyderabad org-env.apigee.net/weather/v1?format=xml&city=Chennai use a Header with valid APIKEY
This is one approach, we can implement the same in various approaches like,
What did you try? What problem did you see?
Hi Dino,
I created a sunset proxy using Existing URL https://query.yahooapis.com
The city name should be passed in request URL.
(Ex: http://query.yahooapis.com/sunset/city/Bangalore) - The city name should be dynamic We can pass any city name.
The api proxy should support both JSON and xml response. If request header called Accept is text/xml then it should return json response. If it is application/json then also it should return JSON response.
Ex: JSON: { "city": "Bangalore", "sunsetTime": "6.42 pm", "created": "2018-05-30T11:15:06Z" }
Please help me to resolve this and suggest me the conditional flows to be applied.
Thanks & Regards
Pratheek
Pratheek, I'm not clear.
you specified " https://query.yahooapis.com" but that URL doesn't do anything. It returns a a page that reports that it is an internal YQL URL.
You also specified this url: http://query.yahooapis.com/sunset/city/Bangalore , which ... doesn't make sense to me. What is that?
Can you take a step back? Remember: I know NOTHING about what you are trying to do.
Explain as if I am not looking at your screen, and as if I am not inside your head. (because I am not)
That you are using yahooapis in particular is irrelevant.
I think you want to
Hey Dino, I m sorry for not giving exact information needed,As a beginner I need to do a scenario can you please help me out please specify me all the actions/methods to do.
1.I want to Create Api proxy
2.URL Should return weather condition of a given city
3.The city name should be passed in request parameter. (Ex: http://myproxyurl.com/weather/v1/find?city=Bangalore)
4.The api proxy should support both JSON and xml response.
5.Pass API key in http header called apikey.
6.The api should allow only 10 requests per minute for a given client.
7.The backend url (https://query.yahooapis.com) should be configurable in KVM(key value Map).
8.And help me to create postman scripts for testing.
9.YQL-Query [ https://query.yahooapis.com/v1/public/yql?q=select item.condition.text from weather.forecast where woeid in (select woeid from geo.places(1) where text="Bangalore")&format=json]
Thank you,
pratheek
Hi @pratheek hipparagi, PFA proxy for your reference. I have tried to cover most of the point,
org-env.apigee.net/weather/v1?format=json&city=Hyderabad org-env.apigee.net/weather/v1?format=xml&city=Chennai use a Header with valid APIKEY
This is one approach, we can implement the same in various approaches like,
Hi Siddharth,
I tried using your zipfile in apigee but I am unable to deploy the bundle as I get the error "Target default has invalid server reference yahoo_url".
Could you tell me why that is or help me figure out a solution?
Thanks.
That proxy uses a target server. It would require an extra setup step on your side to get it to work.
Please find attached a simpler version of the same. It will work without the target server setup. apiproxy-yahoo-weather.zip
Thank you so much. This version works great. I just have one question. I am new to Apigee so I am not sure where the API Key verification takes place and is there a way for there to be a list of users and only a subset can access the API depending on whether they have a key or not. I wonder if I am being clear enough in what I mean and if I should be starting a separate thread for my queries.
Rohan
Your original question was about the Yahoo Weather URL. This question is about API key verification. Generally in that case, you should ask a new question.
You can search around (your question has been asked before), or check youtube. or ask a new question. I'll answer it.
As apigee-edge-deploy-maven-plugin uses this api as a sample, I expect that the maven project in git should be updated also. please correct me if i'm wrong
Hi @Shawky Foda, please create a new question and elabrate what you are trying to do.
I totally feel your frustration with the Yahoo weather API URL acting up. He's been working really weirdly lately. As for the sunset time proxy, just make sure you pass the city name in the request URL, and you'll be good to go. If you're looking for a reliable alternative, I'd recommend checking out worldweatheronline.com. Their API is perfect for professionals like us who need accurate weather data for our businesses, web, and app development projects. Anyway, I wish you all the best and good luck.