lucaslimapoa / NewsAPISwift

NewsAPISwift is a Swift client for News API V2, a service that provides breaking news headlines, and search for articles from over 30,000 news sources and blogs.
MIT License
24 stars 4 forks source link

newsAPI.getTopHeadlines Error #3

Open gcurbelo123 opened 5 years ago

gcurbelo123 commented 5 years ago

Hey Lucas,

Love your Swift Client for the News API. Have been using it for a while with no problems. However, just recently, the function "newsAPI.getTopHeadlines(country: NewsCountry(rawValue: String)" started to give me the error "unableToParse" whenever I pass in "us" as the country. It works with other countries, just not "us."

I know it's not how I am passing the value of the country in, as I use the "newsAPI.getSources(country: NewsCountry(rawValue: String)" and it works when I pass in "us."

Any help would be appreciated. Thank you!

gcurbelo123 commented 5 years ago

So, the error only happens every once in a while, and for a short period of time -- I would say roughly 5-10 minutes. Could this be due to too many API calls?

EDIT: However, I don't think this would be the case, as when I pass in a different country's abbreviations, like "ca," it works every time.