getNewsEndPoint static method
Implementation
static String getNewsEndPoint(
{required NewsType newsType,
Language language = Language.en,
int limit = 10}) {
if (newsType == NewsType.allNews ||
newsType == NewsType.trending ||
newsType == NewsType.topStories) {
return 'https://inshorts.com/api/${getLanguage(language)}/news?category=${getNewsType(newsType)}&max_limit=$limit&include_card_data=true';
}
return 'https://inshorts.com/api/${getLanguage(language)}/search/trending_topics/${getNewsType(newsType)}&max_limit=$limit&type=NEWS_CATEGORY';
}