All URIs are relative to https://api.sendx.io/api/v1/rest
| Method | HTTP request | Description |
|---|---|---|
| CreatePostTag | Post /post/tag | Create post tag |
| DeletePostTag | Delete /post/tag/{identifier} | Delete post tag |
| GetAllPostTags | Get /post/tag | Get all post tags |
| GetPostTag | Get /post/tag/{identifier} | Get post tag by ID |
| UpdatePostTag | Put /post/tag/{identifier} | Update post tag |
RestRPostTag CreatePostTag(ctx).RestEPostTag(restEPostTag).Execute()
Create post tag
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/sendx/sendx-go-sdk"
)
func main() {
restEPostTag := *openapiclient.NewRestEPostTag("Summer Sale") // RestEPostTag |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.PostTagAPI.CreatePostTag(context.Background()).RestEPostTag(restEPostTag).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PostTagAPI.CreatePostTag``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreatePostTag`: RestRPostTag
fmt.Fprintf(os.Stdout, "Response from `PostTagAPI.CreatePostTag`: %v\n", resp)
}Other parameters are passed through a pointer to a apiCreatePostTagRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| restEPostTag | RestEPostTag |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
MessageResponse DeletePostTag(ctx, identifier).Execute()
Delete post tag
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/sendx/sendx-go-sdk"
)
func main() {
identifier := "post_tag_leBDiFdrUnRmRz4nfopSrv" // string | The unique post tag identifier to retrieve. - `post_tag_leBDiFdrUnRmRz4nfopSrv`
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.PostTagAPI.DeletePostTag(context.Background(), identifier).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PostTagAPI.DeletePostTag``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DeletePostTag`: MessageResponse
fmt.Fprintf(os.Stdout, "Response from `PostTagAPI.DeletePostTag`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| identifier | string | The unique post tag identifier to retrieve. - `post_tag_leBDiFdrUnRmRz4nfopSrv` |
Other parameters are passed through a pointer to a apiDeletePostTagRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]RestRPostTag GetAllPostTags(ctx).Execute()
Get all post tags
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/sendx/sendx-go-sdk"
)
func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.PostTagAPI.GetAllPostTags(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PostTagAPI.GetAllPostTags``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetAllPostTags`: []RestRPostTag
fmt.Fprintf(os.Stdout, "Response from `PostTagAPI.GetAllPostTags`: %v\n", resp)
}This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiGetAllPostTagsRequest struct via the builder pattern
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
RestRPostTag GetPostTag(ctx, identifier).Execute()
Get post tag by ID
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/sendx/sendx-go-sdk"
)
func main() {
identifier := "post_tag_leBDiFdrUnRmRz4nfopSrv" // string | The unique post tag identifier to retrieve. - `post_tag_leBDiFdrUnRmRz4nfopSrv`
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.PostTagAPI.GetPostTag(context.Background(), identifier).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PostTagAPI.GetPostTag``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetPostTag`: RestRPostTag
fmt.Fprintf(os.Stdout, "Response from `PostTagAPI.GetPostTag`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| identifier | string | The unique post tag identifier to retrieve. - `post_tag_leBDiFdrUnRmRz4nfopSrv` |
Other parameters are passed through a pointer to a apiGetPostTagRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
RestRPostTag UpdatePostTag(ctx, identifier).RestEPostTag(restEPostTag).Execute()
Update post tag
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/sendx/sendx-go-sdk"
)
func main() {
restEPostTag := *openapiclient.NewRestEPostTag("Summer Sale") // RestEPostTag |
identifier := "post_tag_leBDiFdrUnRmRz4nfopSrv" // string | The unique post tag identifier to retrieve. - `post_tag_leBDiFdrUnRmRz4nfopSrv`
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.PostTagAPI.UpdatePostTag(context.Background(), identifier).RestEPostTag(restEPostTag).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PostTagAPI.UpdatePostTag``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UpdatePostTag`: RestRPostTag
fmt.Fprintf(os.Stdout, "Response from `PostTagAPI.UpdatePostTag`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| identifier | string | The unique post tag identifier to retrieve. - `post_tag_leBDiFdrUnRmRz4nfopSrv` |
Other parameters are passed through a pointer to a apiUpdatePostTagRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| restEPostTag | RestEPostTag |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]