Tide

Platform: API iOS Android

Global tidal data for the next 10 days, including tide table and hourly tide forecast data.

Interface code (Enum) Interface Class
INQUIRE_TYPE_OCEAN_TIDE Tide data OceanTideBaseClass

Request Parameters

If no optional parameters are set, the default value will be used.

  • location(required)The tide station to be queried, need LocationID and LocationID can be obtained by POI Lookup. For example: location=P2951
  • date(required)Set the date, up to 10 days in the future (including today). The date format is yyyyMMdd. Eexample: date=20200531
  • appKey(required)API authentication key, please refer to How To Get Your Key. For example: appKey=12334567890ABC

Sample Code

QWeatherConfigInstance.publicID = @"publicID";
QWeatherConfigInstance.appKey = @"key";
QWeatherConfigInstance.appType = APP_TYPE_BIZ;    
QWeatherConfigInstance.location = @"P66981";
QWeatherConfigInstance.date = @"20210518";
[QWeatherConfigInstance weatherWithInquireType: INQUIRE_TYPE_OCEAN_TIDE WithSuccess:^(OceanTideBaseClass  *responseObject) {
        
    NSLog(@"描述->%@",[responseObject description]);
        
} faileureForError:^(NSError *error) {
    NSLog(@"error->%@",error);
        
}];

Response

  • code See Status Code
  • updateTime API last update time
  • fxLink Responsive web page of this data, for embedded in website or APP
  • tideTable.fxTime High tide or Low tide time
  • tideTable.height The height of the wave, in meters
  • tideTable.type High tide (H) or Low tide (L)
  • tideHourly.fxTime Hourly forecast time
  • tideHourly.height The height of the wave, in meters, maybe null for some POI
  • refer.sources Data source and other statements, may be null
  • refer.license Data license, may be null