Skip to content

Commit

Permalink
fixed start and end date param name
Browse files Browse the repository at this point in the history
  • Loading branch information
paulokuong committed Dec 2, 2017
1 parent 015a9e5 commit 9f71b34
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
24 changes: 12 additions & 12 deletions noaa_sdk/noaa.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ def __init__(self, user_agent=None, accept=None, show_uri=False):
self._osm = OSM()

def get_observations_by_postalcode_country(
self, postalcode, country, startDate, endDate,
self, postalcode, country, start, end,
num_of_stations=-1):
"""Get all nearest station observations by postalcode and
country code.
Expand All @@ -205,10 +205,10 @@ def get_observations_by_postalcode_country(
Args:
postalcode (str): postal code.
country (str): 2 letter country code.
startDate (str): start date of observation
(eg. 2017-06-11T11:50:00+00:00).
endDate (str): end date of observation
(eg. 2017-06-11T11:50:00+00:00).
start (str): start date of observation
(eg. 2017-06-11T11:50:00Z).
end (str): end date of observation
(eg. 2017-06-11T11:50:00Z).
num_of_stations (int[optional]): get observations from the
nearest x stations.
Returns:
Expand All @@ -232,7 +232,7 @@ def get_observations_by_postalcode_country(
break
station_id = station.split('/')[-1]
response = self.stations_observations(
station_id=station_id, startDate=startDate, endDate=endDate)
station_id=station_id, start=start, end=end)
for observation in response['features']:
yield observation['properties']

Expand Down Expand Up @@ -318,10 +318,10 @@ def stations_observations(self, station_id, **params):
Args:
station_id (str): station id.
startDate (str[optional]): start date of observation
(eg. 2017-06-11T11:50:00+00:00).
endDate (str[optional]): end date of observation
(eg. 2017-06-11T11:50:00+00:00).
start (str[optional]): start date of observation
(eg. 2017-06-11T11:50:00Z).
end (str[optional]): end date of observation
(eg. 2017-06-11T11:50:00Z).
limit (int[optional]): limit of results.
current (bool[optional]): True if needs current observations.
recordId (str[optional]): recordId, Record Id (ISO8601DateTime)
Expand Down Expand Up @@ -471,8 +471,8 @@ def alerts(self, **params):
Args:
alert_id (str): alert id.
active (int): Active alerts (1 or 0).
startDate (str): Start time (ISO8601DateTime).
endDate (str): End time (ISO8601DateTime).
start (str): Start time (ISO8601DateTime).
end (str): End time (ISO8601DateTime).
status (str): Event status (alert, update, cancel).
type (str): Event type (list forthcoming).
zone_type (str): Zone type (land or marine).
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
long_description = file.read()

setup(name='noaa-sdk',
version='0.1.2',
version='0.1.2a',
description='NOAA API (V3) Python 3 SDK.',
install_requires=[
'httplib2==0.10.3',
Expand Down

0 comments on commit 9f71b34

Please sign in to comment.