-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapi.html
32 lines (27 loc) · 1.41 KB
/
api.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<!DOCTYPE HTML>
<html>
<meta charset="utf-8">
<head>
<title>SimpleWeather API DEMO</title>
<!-- jQuery / jQueryMobile Scripts -->
<script src="js/code.jquery.com/jquery-1.9.1.min.js"></script>
<script type="text/javascript" src="js/code.jquery.com/ajax/jquery.min.js"></script>
<!-- SimpleWeather API By Jeroen_13 -->
<script src="js/simpleweather.lib.js"></script>
</head>
<body>
<script type="text/javascript">
//Usage: SimpleWeather.GetWeather('<name>', '<search param>', '<amount of days>', '<units: metric - imperial>', '<language !SEE WIKI!>', '<timeout in ms>', '<onSuccess func>', '<onError func>');
SimpleWeather.GetWeather('london', 'london,gb', '4', 'metric', 'en', '2000', 'mysuccess', 'myerror');
//Usage: SimpleWeather.GetWeather('<name>', '<search param>', '<units: metric - imperial>', '<language !SEE WIKI!>', '<timeout in ms>', '<onSuccess func>', '<onError func>');
// PLEASE NOTE THAT WE USE THE SAME CITY, BUT NOT THE SAME "NAME" !!!
SimpleWeather.GetCurrentWeather('london2', 'london,gb', 'metric', 'en', '2000', 'mysuccess', 'myerror');
function mysuccess(){
alert('Weather Forecast fetched !')
}
function myerror(){
alert('Something went wrong :( Please see the console for more info')
}
</script>
</body>
</html>