Skip to content

Commit

Permalink
Merge pull request #1 from wonderlandpark/patch-1
Browse files Browse the repository at this point in the history
Make sentences more smooth
  • Loading branch information
SaidBySolo committed Jul 11, 2020
2 parents 7f790d0 + 079101b commit c9fe029
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions spacexpy/spacexclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class SpaceXClient():

async def capsules(self, capsule_id:str= None, query=None):
if len(list(filter(None.__ne__, [capsule_id, query]))) >= 2:
raise UnexpectedArguments('Two or more arguments cannot come.')
raise UnexpectedArguments('Only one argument is required but received more than one')
elif capsule_id is not None:
return await http.capsules('get', f'/capsules/{capsule_id}')
elif query is not None:
Expand All @@ -20,7 +20,7 @@ async def company(self):

async def cores(self, core_id:str= None, query=None):
if len(list(filter(None.__ne__, [core_id, query]))) >= 2:
raise UnexpectedArguments('Two or more arguments cannot come.')
raise UnexpectedArguments('Only one argument is required but received more than one')
elif core_id is not None:
return await http.cores('get', f'/cores/{core_id}')
elif query is not None:
Expand All @@ -30,7 +30,7 @@ async def cores(self, core_id:str= None, query=None):

async def crew(self, crew_id:str=None, query=None):
if len(list(filter(None.__ne__, [crew_id, query]))) >= 2:
raise UnexpectedArguments('Two or more arguments cannot come.')
raise UnexpectedArguments('Only one argument is required but received more than one')
elif crew_id is not None:
return await http.crew('get', f'/crew/{crew_id}')
elif query is not None:
Expand All @@ -40,7 +40,7 @@ async def crew(self, crew_id:str=None, query=None):

async def dragons(self, dragon_id:str= None, query=None):
if len(list(filter(None.__ne__, [dragon_id, query]))) >= 2:
raise UnexpectedArguments('Two or more arguments cannot come.')
raise UnexpectedArguments('Only one argument is required but received more than one')
elif dragon_id is not None:
return await http.dragons('get', f'/dragons/{dragon_id}')
elif query is not None:
Expand All @@ -50,7 +50,7 @@ async def dragons(self, dragon_id:str= None, query=None):

async def landpads(self, landpad_id:str= None, query=None):
if len(list(filter(None.__ne__, [landpad_id, query]))) >= 2:
raise UnexpectedArguments('Two or more arguments cannot come.')
raise UnexpectedArguments('Only one argument is required but received more than one')
elif landpad_id is not None:
return await http.landpads('get', f'/landpads/{landpad_id}')
elif query is not None:
Expand All @@ -60,7 +60,7 @@ async def landpads(self, landpad_id:str= None, query=None):

async def launches(self, schedule:str = None, launche_id:str= None, query=None):
if len(list(filter(None.__ne__, [schedule, launche_id, query]))) >= 2:
raise UnexpectedArguments('Two or more arguments cannot come.')
raise UnexpectedArguments('Only one argument is required but received more than one')
elif schedule is not None:
schedule_list = ['past', 'upcomming', 'latest', 'next']
if schedule in schedule_list:
Expand Down Expand Up @@ -125,4 +125,4 @@ async def starlink(self, starlink_id:str= None, query=None):
elif query is not None:
return await http.starlink('post', '/starlink/query', query)
else:
return await http.starlink('get', '/starlink')
return await http.starlink('get', '/starlink')

0 comments on commit c9fe029

Please sign in to comment.