# \UploadAPI All URIs are relative to *http://localhost* Method | HTTP request | Description ------------- | ------------- | ------------- [**AnswerApiV1FilePost**](UploadAPI.md#AnswerApiV1FilePost) | **Post** /answer/api/v1/file | upload file [**AnswerApiV1PostRenderPost**](UploadAPI.md#AnswerApiV1PostRenderPost) | **Post** /answer/api/v1/post/render | render post content ## AnswerApiV1FilePost > AnswerApiV1FilePost200Response AnswerApiV1FilePost(ctx).Source(source).File(file).Execute() upload file ### Example ```go package main import ( "context" "fmt" "os" openapiclient "git.ncc.cx/package/openapi-go-answer" ) func main() { source := "source_example" // string | identify the source of the file upload file := os.NewFile(1234, "some_file") // *os.File | file configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) resp, r, err := apiClient.UploadAPI.AnswerApiV1FilePost(context.Background()).Source(source).File(file).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `UploadAPI.AnswerApiV1FilePost``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `AnswerApiV1FilePost`: AnswerApiV1FilePost200Response fmt.Fprintf(os.Stdout, "Response from `UploadAPI.AnswerApiV1FilePost`: %v\n", resp) } ``` ### Path Parameters ### Other Parameters Other parameters are passed through a pointer to a apiAnswerApiV1FilePostRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **source** | **string** | identify the source of the file upload | **file** | ***os.File** | file | ### Return type [**AnswerApiV1FilePost200Response**](AnswerApiV1FilePost200Response.md) ### Authorization [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers - **Content-Type**: multipart/form-data - **Accept**: */* [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) ## AnswerApiV1PostRenderPost > HandlerRespBody AnswerApiV1PostRenderPost(ctx).Data(data).Execute() render post content ### Example ```go package main import ( "context" "fmt" "os" openapiclient "git.ncc.cx/package/openapi-go-answer" ) func main() { data := *openapiclient.NewSchemaPostRenderReq() // SchemaPostRenderReq | PostRenderReq configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) resp, r, err := apiClient.UploadAPI.AnswerApiV1PostRenderPost(context.Background()).Data(data).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `UploadAPI.AnswerApiV1PostRenderPost``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `AnswerApiV1PostRenderPost`: HandlerRespBody fmt.Fprintf(os.Stdout, "Response from `UploadAPI.AnswerApiV1PostRenderPost`: %v\n", resp) } ``` ### Path Parameters ### Other Parameters Other parameters are passed through a pointer to a apiAnswerApiV1PostRenderPostRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **data** | [**SchemaPostRenderReq**](SchemaPostRenderReq.md) | PostRenderReq | ### Return type [**HandlerRespBody**](HandlerRespBody.md) ### Authorization [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)