financial-api 0.4.1

Rust client for the official Tonghuashun Financial Data REST API
Documentation
use crate::endpoints;
use crate::{Client, Error, FundProfileData, FundType, Response, Thscode, ValidationError};

impl Client {
    /// 获取基金基本资料。
    ///
    /// # 示例
    #[doc = concat!(
        "```no_run\n",
        include_str!("../../examples/fund_profile_detail.rs"),
        "\n```"
    )]
    pub async fn fund_profile_detail(
        &self,
        fund_type: FundType,
        thscode: impl TryInto<Thscode, Error: Into<ValidationError>>,
    ) -> Result<Response<FundProfileData>, Error> {
        self.fund_detail(endpoints::FUND_PROFILE, fund_type, thscode)
            .await
    }
}