DoAPI executes a raw Lark SDK request and returns the raw *larkcore.ApiResp. Unlike CallAPI which always JSON-decodes, DoAPI returns the raw response — suitable for file downloads (pass larkcore.WithFileDownload() via request.ExtraOpts) and any endpoint whose Content-Type may not be JSON.
(ctx context.Context, request RawApiRequest)
| 314 | // for file downloads (pass larkcore.WithFileDownload() via request.ExtraOpts) and |
| 315 | // any endpoint whose Content-Type may not be JSON. |
| 316 | func (c *APIClient) DoAPI(ctx context.Context, request RawApiRequest) (*larkcore.ApiResp, error) { |
| 317 | apiReq, extraOpts := c.buildApiReq(request) |
| 318 | return c.DoSDKRequest(ctx, apiReq, request.As, extraOpts...) |
| 319 | } |
| 320 | |
| 321 | // CallAPI is a convenience wrapper: DoAPI + ParseJSONResponse. Use DoAPI |
| 322 | // directly when the response may not be JSON (e.g. file downloads). |
no test coverage detected