mattlisiv / newsapi-python

A Python Client for News API
MIT License
376 stars 130 forks source link

Authentication, Type/Value checks, Use of News API error messages, and addressed a Windows cmd error #11

Closed bantaisaiah closed 6 years ago

bantaisaiah commented 6 years ago
mattlisiv commented 6 years ago

Hi @banta-isaiah ,

Thanks for the update. I really like the way these type checks are handled with the library.

A few things I think need to be adjusted:

  1. You have a typo in a few error statements where the flag is 'raist' rather than 'raise'
  2. On line 211, it should be:
if language not in const.languages:

rather than containing a 'is' .

  1. For now, let's keep the parameter as 'to' rather than 'to_param' . I definitely think it is better naming convention, but I don't want to worry about breaking anyone's app with a version upgrade or updating the documentation on newsapi.org without a CHANGELOG in place.

Thanks!

bantaisaiah commented 6 years ago

Done! Let me know if there is anything else you see an issue with

mattlisiv commented 6 years ago

@banta-isaiah, it looks like you still have the to_param set as an argument within the function (line 121) .

def get_everything(self, q=None, sources=None, domains=None, from_param=None, to_param=None, language=None

Once that is corrected, everything looks good!