Go to file
imi415 89798c0fee
Fixed docs.
2021-05-05 21:18:30 +08:00
lib Refactored API. 2021-05-05 21:16:45 +08:00
Gemfile Initial commit, with real-time condition. 2021-05-05 20:20:31 +08:00
Gemfile.lock Initial commit, with real-time condition. 2021-05-05 20:20:31 +08:00
LICENSE Added LICENSE. 2021-05-05 20:24:05 +08:00
README.md Fixed docs. 2021-05-05 21:18:30 +08:00
moji_weather.gemspec Initial commit, with real-time condition. 2021-05-05 20:20:31 +08:00

README.md

Moji Weather API (for Aliyun Cloud Market)

Usage:

client = MojiWeather::Api::Client.new app_code: "YOUR_APP_CODE"

result = client.query MojiWeather::Api::ApiType::AQI, location: {lat: 39.95, lon: 116.36}
result = client.query MojiWeather::Api::ApiType::AQI, city_id: 2

ApiType has the following possible values (more is WIP):

  • MojiWeather::Api::ApiType::CONDITION: Real-time condition
  • MojiWeather::Api::ApiType::FORECAST_24HRS: 24-hour forecast
  • MojiWeather::Api::ApiType::AQI: Air quality index(AQI)