| | |
| | | var response = yield request({ |
| | | uri: url, |
| | | method: "POST", |
| | | headers: {'Authorization':'APPCODE 77eac517509d412a817a5a4eb07310ba'}, |
| | | headers: {'Authorization':'APPCODE 31b6ea8f804a4472be3b633cfee44849'}, |
| | | form: { |
| | | "cityId": cityID, |
| | | "token": tokens[apiKey] |
| | |
| | | router.get('/gk', wrap(function* (req, res, next) { |
| | | |
| | | var apiKey = req.query.apiKey; |
| | | var cityID = req.query.cityID; |
| | | var url = 'https://api.epmap.org/api/v1/air/' + key; |
| | | var stationCode = req.query.stationCode; |
| | | var url = 'http://api.epmap.org/api/v1/air/' + apiKey + '?station_code=' + stationCode; |
| | | // noinspection JSAnnotator |
| | | var response = yield request({ |
| | | uri: url, |
| | | method: "GET", |
| | | headers: {'Authorization':'APPCODE 77eac517509d412a817a5a4eb07310ba'}, |
| | | form: { |
| | | "station_code": cityID |
| | | } |
| | | headers: {'Authorization':'APPCODE 31b6ea8f804a4472be3b633cfee44849'} |
| | | }); |
| | | var data = JSON.parse(response.body); |
| | | |