Skip to content

Commit

Permalink
date changes
Browse files Browse the repository at this point in the history
  • Loading branch information
apex2504 committed May 4, 2020
1 parent f17499d commit 65407a0
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion corona_api/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
from .statistics import *
from .utils import *

__version__ = "0.8.0"
__version__ = "0.8.1"
__author__ = "Rob Wainwright // apex2504"
__license__ = "MIT"
9 changes: 9 additions & 0 deletions corona_api/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,9 @@ def _compile_nyt_state(self, data):
cases = data.get('cases')
deaths = data.get('deaths')

if date:
date = datetime.strptime(date, "%Y-%m-%d")

return NewYorkTimesStateStatistics(
date,
state,
Expand All @@ -225,6 +228,9 @@ def _compile_nyt_county(self, data):
cases = data.get('cases')
deaths = data.get('deaths')

if date:
date = datetime.strptime(date, "%Y-%m-%d")

return NewYorkTimesCountyStatistics(
date,
county,
Expand Down Expand Up @@ -617,6 +623,9 @@ async def get_nyt_usa_data(self):
cases = d.get('cases')
deaths = d.get('deaths')

if date:
date = datetime.strptime(date, "%Y-%m-%d")

dates.append(
NewYorkTimesUsaStatistics(
date,
Expand Down
2 changes: 1 addition & 1 deletion corona_api/request.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import aiohttp
from .exceptions import NotFound, APIError

ver = "0.8.0"
ver = "0.8.1"

class RequestClient:
def __init__(self):
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
setup(
name = 'corona_api',
packages = ['corona_api'],
version = '0.8.0',
version = '0.8.1',
license='MIT',
description = 'An asynchronous wrapper for the corona.lmao.ninja API written in Python.',
long_description= long_desc,
Expand Down

0 comments on commit 65407a0

Please sign in to comment.