Difference between revisions of "5 Get the city weather"

From Banana Pi Wiki
Jump to: navigation, search
(Prepare the weather API)
(Prepare the weather API)
Line 27: Line 27:
 
  }
 
  }
 
  }
 
  }
 +
 +
We can analyze these json files and write an example like this
 +
 +
==example analyse==

Revision as of 20:32, 23 February 2019

The development of preparation

  • 1. First, ensure the integrity of the current firmware dependency package
help(“modules”)
  • The effect is shown below. If you do not have two dependency packages on the diagram, please burn the latest firmware.
Weathercheck.png

Prepare the weather API

{
"weatherinfo": 
{
"city": "荆州",
"cityid": "101200801",
"img1": "n7.gif",
"img2": "d2.gif",
"ptime": "18:00",
"temp1": "16℃",
"temp2": "23℃",
"weather": "小雨转阴"
}
}

We can analyze these json files and write an example like this

example analyse