public async Task GetCompanyInformation() { StockId id = "sh.600519"; var result = await TuShare.GetCompanyInformation(id); Assert.AreEqual(result.Id.ToString("b"), id.ToString("b")); }
/// <summary> /// </summary> /// <typeparam name="T"></typeparam> /// <param name="api"></param> /// <param name="args"></param> /// <returns></returns> public T Fetch <T>(Api api, params object[] args) { string[] arguments = args.Select( argument => argument switch { DateTime arg => arg.ToString("yyyy-MM-dd"), StockId arg => arg.ToString("b"), null => null, _ => argument.ToString() }