You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
imi415 4a56f6ccda
Updated API types and base URL changes.
Signed-off-by: imi415 <imi415@imi.moe>
8 months ago
lib Updated API types and base URL changes. 8 months ago
Gemfile Initial commit, with real-time condition. 2 years ago
Gemfile.lock Initial commit, with real-time condition. 2 years ago
LICENSE Added LICENSE. 2 years ago
README.md Added more APIs. 2 years ago
moji_weather.gemspec Initial commit, with real-time condition. 2 years ago

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::FORECAST_15DAYS: 15-day forecast
  • MojiWeather::Api::ApiType::LIMIT: Number plate limitation for vehicles in certain cities
  • MojiWeather::Api::ApiType::LIFE_INDEX: Useful life tips and index score based on weather (in Chinese)
  • MojiWeather::Api::ApiType::AQI: Air quality index(AQI)