Closed

Weather API Web Service Process

Weather widget spec

High priority

Normal priority

Requirements:

● Provide up-to-date, location-based weather details

● Feed data in simple JSON-encoded and JSONP-encoded formats

● PHP, MySQL

Performance:

● System should be able to respond to requests within a maximum of 0.5 seconds (minus

external API calls to WeatherBug API)

● System should respond immediately (less than 0.1 seconds and before it tries to access

external APIs) if user-supplied location info is not usable.

● Data should be cached whenever reasonable. Will need to find out how often both feeds

update, but perhaps we can keep the top 20 stations cached for about 7 minutes.

Security:

● Filter XSS attacks

● Only allow GET requests

Languages:

● French and English

Location support:

● location format should be flexible

○ postal/zip code

○ latlong

○ city

○ address (if unknown, the system should return a list of possible matches)

● if there are multiple locations, provide data for the closest one and provide a list of

nearby weather stations

Request structure:

● We will request data from the system using HTTP from external servers. Sometimes this

will occur on the server (JSON), sometimes on the client (JSONP).

● Requests should be a liberal in terms of what they will accept as input. For example,

address formats should be fairly flexible, postal code should be able to understand all

caps / no caps / no space (r3l0a5) / space (r3l 0a5) / url-encoded space (r3l%200a5)

● The system should return data conservatively, that is, it should only return data that has

been requested.

Documentation

Request string

The data to be returned is to be selected using a regular HTTP request with GET parameters.

Parameter Values Returns Default

location [postal code]

[zip code]

[city]

[country]

[address]

[latlong]

null

For a focused location, returns requested weather

data for the nearest station, and a list of 10 closest

stations (if data is set to “all”).

For a general location (city, country, region),

returns the 10 most popular station queries in that

area, based on previous requests to the system.

null returns the 10 most popular station queries to

the system and weather data (if requested) for the

most popular station.

null

data “wb”

“ec”

“both”

“all”

“all_wb”

“all_cwb”

Either data from WeatherBug, data from

Environment Canada, or both.

“all” will return both feeds with list of 10 nearest

stations.

“all_wb” and “all_ec” return weather data for that

feed, and list of 10 nearest stations.

“both”

type “lr”

“c”

“s”

“s_info”

“lr” -- Long-range forecast (7-day)

“c” -- current weather conditions

“s” -- a list of 10 closest stations if possible, or a list

of 10 popular stations in the region.

“s_info” -- location info for a station

“c”

page [int] Used with type=s to get the next 10 results 1

format “json”

“jsonp”

“json” -- returns pure JSON data

“jsonp” -- returns JSONP

“json”

callback [string] Used with jsonp requests to determine the name of

the wrapper for the JSON data

“callback”

dataset “all”

“basic”

Return either all data provided by the two sources,

or just basic weather info.

“basic”

Basic: temp, high, low, wind, windchill, humidity,

precip

temp_units “c”

“f”

celsius or farrenheit “c”

distance_units “ft”

“km”

“mi”

feet, km, or miles “km”

Return Values

(items surrounded by “__” are placeholders)

// ======================================================

// = [url removed, login to view] =

// ======================================================

//data=all -- all data (wb and ec, and list of nearby stations),

//location=r3l0a5 -- a specific location, so a single station is returned

//type=lr -- long-range forecast

{

"data_segment": "long_range_station_data",

"station_name": "__name of the station__",

"data": {

//If there is only a station available for one of the feeds, the other will be

false.

//For example, "ec": false (see below)

"wb": [

//array should have 7 members, 1 for each day in the forecast

{

"__unix datestamp__": {

"temp": "__temperature in C__",

""

}

Skills: MySQL, PHP

See more: php weather location json, weather api mysql, environment canada weather api, web service postal code, web server languages, web languages list, web based languages, weatherbug, weather apis, type data structure, tries data structure, temp service, string data structure, results focused, process data structure, php client canada, matches list, list web languages, list matches, languages web, json calls, get external data, example array data structure, data structure set, data structure array

About the Employer:
( 0 reviews ) Winnipeg, Canada

Project ID: #1265233

9 freelancers are bidding on average $980 for this job

buraqtech

Check your PMB for details!!!

$1385 USD in 22 days
(63 Reviews)
7.6
zainy01

Hi! I m highly interested in it

$750 USD in 10 days
(49 Reviews)
6.7
softwarevamp

Hello, i can do this in a timely manner look to work with you At your disposal for any query. Regards softwarevamp

$1199 USD in 14 days
(23 Reviews)
4.8
desigmbooms

Please check PMB to see our previous works Thanks

$1200 USD in 45 days
(6 Reviews)
4.3
esalem

Hello, please see the PMB for details.

$1200 USD in 30 days
(2 Reviews)
3.2
theredesign

Bonjour je peux realiser ce project.

$755 USD in 25 days
(3 Reviews)
2.3
ASoftSolutions

Hello, Please view PM.

$750 USD in 5 days
(0 Reviews)
0.0
devstudio312

Hello, We believe we can assist you with your project. Please visit our site (development312.com) to learn more about our skills and qualifications.

$830 USD in 10 days
(0 Reviews)
0.0
gujarattechno4

Hiee I am Vishakha Gadhavi from Gujarat Technologies PVT LTD. And My Designation is Branch Development Manager. Company Introduction - Gujarat Technologies PVT LTD was incorporated in the year 2006. In th More

$750 USD in 25 days
(0 Reviews)
0.0