Skip to main content

CreativeCenterClient

Struct CreativeCenterClient 

Source
pub struct CreativeCenterClient<'a> { /* private fields */ }
Expand description

Creative center API client.

Implementations§

Source§

impl<'a> CreativeCenterClient<'a>

Source

pub async fn season_list( &self, params: SeasonListParams, ) -> BpiResult<SeasonListData>

Lists seasons created by the current authenticated user.

Source

pub async fn season_info( &self, params: SeasonInfoParams, ) -> BpiResult<SeasonInfoData>

Gets one creative center season by season id.

Source

pub async fn season_by_aid( &self, params: SeasonByAidParams, ) -> BpiResult<SeasonByAidData>

Gets the season that contains an archive id.

Source

pub async fn season_section_episodes( &self, params: SeasonSectionEpisodesParams, ) -> BpiResult<SeasonSectionEpisodesData>

Gets videos in a creative center season section.

Source

pub async fn archives_list( &self, params: UpArchivesListParams, ) -> BpiResult<SpArchivesData>

Lists archives for the current authenticated creator.

Source

pub async fn archive_videos( &self, params: UpArchiveVideosParams, ) -> BpiResult<ArchiveVideosData>

Gets basic video information for a creator archive.

Source

pub async fn up_stat(&self) -> BpiResult<UpStatData>

Gets creator video statistics.

Source

pub async fn archive_compare( &self, params: UpArchiveCompareParams, ) -> BpiResult<ArchiveCompareData>

Gets creator archive comparison statistics.

Source

pub async fn article_stat(&self) -> BpiResult<UpArticleStatData>

Gets creator article statistics.

Source

pub async fn video_trend( &self, params: UpVideoTrendParams, ) -> BpiResult<Vec<VideoTrendItem>>

Gets creator video trend data.

Source

pub async fn article_trend( &self, params: UpArticleTrendParams, ) -> BpiResult<Vec<ArticleTrendItem>>

Gets creator article trend data.

Source

pub async fn play_source(&self) -> BpiResult<PlaySourceData>

Gets creator playback source distribution.

Source

pub async fn viewer_data(&self) -> BpiResult<ViewerData>

Gets creator viewer distribution data.

Source

pub async fn electromagnetic_info(&self) -> BpiResult<ElectromagneticInfo>

Gets current account electromagnetic rating information.

Source§

impl<'a> CreativeCenterClient<'a>

Source

pub async fn dynamic_delete(&self, dyn_id: &str) -> BpiResult<Option<Value>>

删除动态

§参数
名称类型说明
dyn_id&str动态 ID
§文档

删除动态

Source

pub async fn article_delete(&self, aid: u64) -> BpiResult<Option<Value>>

删除专栏

§参数
名称类型说明
aidu64专栏文章 ID
§文档

删除专栏

Source§

impl<'a> CreativeCenterClient<'a>

Source

pub async fn season_create( &self, title: &str, desc: Option<&str>, cover: &str, season_price: Option<u32>, ) -> BpiResult<u64>

创建合集

创建一个新的视频合集,需要提供标题、封面等信息。

§参数
名称类型说明
title&str合集标题
descOption<&str>合集简介,可选
cover&str封面图 URL(从上传接口获取)
season_priceOption<u32>合集价格,可选,默认 0
§文档

创建合集

Source

pub async fn season_delete(&self, season_id: u64) -> BpiResult<Option<Value>>

删除合集

删除指定的合集,需要提供合集 ID。

§参数
名称类型说明
season_idu64合集 ID
§文档

删除合集

Source

pub async fn season_episodes_add( &self, section_id: u64, episodes: Vec<EpisodeAdd>, ) -> BpiResult<Option<Value>>

添加视频到合集

将视频添加到指定的合集小节中。

§参数
名称类型说明
section_idu64合集小节 ID
episodesVec<EpisodeAdd>视频列表
§文档

添加视频到合集

Source§

impl<'a> CreativeCenterClient<'a>

Source

pub async fn season_edit( &self, season: SeasonEdit, sorts: Vec<SeasonSectionSort>, ) -> BpiResult<Option<Value>>

编辑合集信息

编辑合集的基本信息,包括标题、封面、简介等。

§参数
名称类型说明
seasonSeasonEdit合集信息
sortsVec<SeasonSectionSort>小节排序列表
§文档

编辑合集信息

Source

pub async fn season_section_edit( &self, section: SeasonSectionEdit, sorts: Vec<SectionSort>, ) -> BpiResult<Option<Value>>

编辑合集小节(需要开启小节功能)

编辑合集中的小节信息,包括小节标题和视频排序。

§参数
名称类型说明
sectionSeasonSectionEdit小节信息
sortsVec<SectionSort>视频排序信息
§文档

编辑合集小节

Source

pub async fn season_section_episode_edit( &self, section: EpisodeEdit, sorts: Vec<EpisodeSort>, ) -> BpiResult<Option<Value>>

编辑小节中的章节

编辑合集中的小节信息,包括小节标题和视频排序。

§参数
名称类型说明
sectionSeasonSectionEdit小节信息
sortsVec<SectionSort>视频排序信息
§文档

编辑合集小节

Source

pub async fn season_enable_section( &self, season_id: u64, enable: bool, ) -> BpiResult<Option<Value>>

切换小节/正常显示

§参数
  • season_id 合集id
Source

pub async fn season_section_add_episodes( &self, section_id: u64, episodes: Vec<Episode>, ) -> BpiResult<Option<Value>>

添加视频到小节(需要开启小节功能)

将视频添加到指定的合集小节中。

§参数
名称类型说明
aidu64视频 aid
season_idu64合集 ID
section_idu64小节 ID
title&str视频标题
§文档

编辑投稿视频合集/小节

Source§

impl<'a> CreativeCenterClient<'a>

Source

pub async fn upload_cover( &self, mime_type: &str, cover: impl AsRef<str>, ) -> BpiResult<UploadCoverData>

上传视频封面

上传视频封面图片,支持多种输入格式。

§参数
名称类型说明
mime_type&str图片 MIME 类型,如 image/jpeg
coverAsRef<str>封面数据,可以是:纯 base64、完整 data URI、文件路径
§注意

文件不得超过 20M

§文档

上传视频封面

Trait Implementations§

Source§

impl<'a> Clone for CreativeCenterClient<'a>

Source§

fn clone(&self) -> CreativeCenterClient<'a>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'a> Copy for CreativeCenterClient<'a>

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more