WeatherModel.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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. /// 天气代码
  12. @property (nonatomic, nullable, copy) NSString *code;
  13. /// 最高温度
  14. @property (nonatomic, nullable, copy) NSString *high;
  15. /// 湿度
  16. @property (nonatomic, nullable, copy) NSString *humidity;
  17. /// 更新时间
  18. @property (nonatomic, nullable, copy) NSString *lastUpdate;
  19. /// 最低温度
  20. @property (nonatomic, nullable, copy) NSString *low;
  21. /// 地区
  22. @property (nonatomic, nullable, copy) NSString *name;
  23. /// 温度
  24. @property (nonatomic, nullable, copy) NSString *temperature;
  25. /// 天气现象
  26. @property (nonatomic, nullable, copy) NSString *text;
  27. /// 风力等级
  28. @property (nonatomic, nullable, copy) NSString *windScale;
  29. + (void)rds_getWeatherFinished:(void(^)(WeatherModel *weather, NSError *error))finished;
  30. @end
  31. @interface Location : NSObject
  32. @property (nonatomic, copy) NSString *country;
  33. @property (nonatomic, copy) NSString *province;
  34. @property (nonatomic, copy) NSString *city; // 城市
  35. @property (nonatomic, copy) NSString *name;
  36. @end
  37. @interface Now : NSObject
  38. @property (nonatomic, copy) NSString *text; // 天气
  39. @property (nonatomic, copy) NSString *wind_class;// 风力等级
  40. @property (nonatomic, copy) NSString *wind_dir; // 风向描述
  41. @property (nonatomic, copy) NSString *uptime; // 更新时间
  42. @property (nonatomic, copy) NSString *icon_code; // 天气图标编码
  43. @property (nonatomic, assign) int temp; // 温度
  44. @property (nonatomic, assign) int feels_like; // 体感温度
  45. @property (nonatomic, assign) int rh; // 湿度
  46. @end
  47. NS_ASSUME_NONNULL_END