Package-level declarations

Types

Link copied to clipboard
@Serializable
data class ArticleDTO(val source: SourceDTO, val author: String? = null, val title: String, val description: String? = null, val url: String, val urlToImage: String? = null, val publishedAt: String, val content: String? = null)

Represents a single news article. This is the main item in the list, analogous to your TradingProductDTO.

Link copied to clipboard
@Serializable
data class NewsApiResponseDTO(val status: String, val totalResults: Int? = null, val articles: List<ArticleDTO>? = null, val code: String? = null, val message: String? = null)

Represents the top-level response from the NewsAPI v2 /everything endpoint.

Link copied to clipboard
@Serializable
data class SourceDTO(val id: String? = null, val name: String)

Represents the source of the news article, nested within ArticleDTO.