/ examples / news.ts
news.ts
1  import { getNewsFrom } from "crous-mobile";
2  
3  const news = await getNewsFrom("limoges");
4  
5  for (const article of news) {
6    console.log(`[${article.category}]: ${article.title}, published @ ${article.publishedAt.toLocaleDateString()}`);
7    // You can retrieve the HTML content of the article by using `article.content`.
8    // We're not doing it here to avoid cluttering the console.
9  }