Skip to main content

하위 모듈

모듈 내용

이 모듈은 X API의 news 엔드포인트에 대한 액세스를 제공합니다. 모든 news-related 기능의 주요 진입점 역할을 합니다.

class xdk.news.NewsClient

뉴스 작업을 위한 클라이언트

매개변수

Client

__init__

매개변수

Client

get

Get news stories by ID Retrieves news story by its ID.

매개변수

Any
The ID of the news story.
List or None
default:"None"
A comma separated list of News fields to display.

반환값

GetResponse - 응답 데이터 Search News Retrieves a list of News stories matching the specified search query.

매개변수

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.

반환값

SearchResponse - 응답 데이터