Submodules
Module contents
This module provides access to the news endpoints of the X API and serves as the main entry point for all news-related functionality.class xdk.news.NewsClient
Client for news operations
Parameters
Client
__init__
Parameters
Client
get
Get news stories by ID
Retrieves news story by its ID.
Parameters
Any
The ID of the news story.
List or None
default:"None"
A comma separated list of News fields to display.
Returns
GetResponse - Response data
search
Search News
Retrieves a list of News stories matching the specified search query.
Parameters
str
The search query.
int or None
default:"None"
The number of results to return.
int or None
default:"None"
The maximum age of the News story to search for.
List or None
default:"None"
A comma separated list of News fields to display.
Returns
SearchResponse - Response data