WeatherModel.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. //
  2. // WeatherModel.h
  3. // Temperature
  4. //
  5. // Created by RD on 2023/4/26.
  6. //
  7. #import <Foundation/Foundation.h>
  8. NS_ASSUME_NONNULL_BEGIN
  9. @class Location,Now;
  10. @interface WeatherModel : NSObject
  11. @property (nonatomic, strong) Location *location;
  12. @property (nonatomic, strong) Now *now;
  13. + (void)rds_getWeatherFinished:(void(^)(WeatherModel *weather, NSError *error))finished;
  14. @end
  15. @interface Location : NSObject
  16. @property (nonatomic, copy) NSString *country;
  17. @property (nonatomic, copy) NSString *province;
  18. @property (nonatomic, copy) NSString *city; // 城市
  19. @property (nonatomic, copy) NSString *name;
  20. @end
  21. @interface Now : NSObject
  22. @property (nonatomic, copy) NSString *text; // 天气
  23. @property (nonatomic, copy) NSString *wind_class;// 风力等级
  24. @property (nonatomic, copy) NSString *wind_dir; // 风向描述
  25. @property (nonatomic, copy) NSString *uptime; // 更新时间
  26. @property (nonatomic, copy) NSString *icon_code; // 天气图标编码
  27. @property (nonatomic, assign) int temp; // 温度
  28. @property (nonatomic, assign) int feels_like; // 体感温度
  29. @property (nonatomic, assign) int rh; // 湿度
  30. @end
  31. NS_ASSUME_NONNULL_END