All URIs are relative to https://q.trap.jp/api/v3
Method | HTTP request | Description |
---|---|---|
AddMyUserTag | Post /users/me/tags | 自分にタグを追加 |
AddUserTag | Post /users/{userId}/tags | ユーザーにタグを追加 |
EditMyUserTag | Patch /users/me/tags/{tagId} | 自分のタグを編集 |
EditUserTag | Patch /users/{userId}/tags/{tagId} | ユーザーのタグを編集 |
GetMyUserTags | Get /users/me/tags | 自分のタグリストを取得 |
GetTag | Get /tags/{tagId} | タグ情報を取得 |
GetUserTags | Get /users/{userId}/tags | ユーザーのタグリストを取得 |
RemoveMyUserTag | Delete /users/me/tags/{tagId} | 自分からタグを削除します |
RemoveUserTag | Delete /users/{userId}/tags/{tagId} | ユーザーからタグを削除します |
UserTag AddMyUserTag(ctx).PostUserTagRequest(postUserTagRequest).Execute()
自分にタグを追加
package main
import (
"context"
"fmt"
"os"
traq "github.com/traPtitech/go-traq"
)
func main() {
postUserTagRequest := *traq.NewPostUserTagRequest("Tag_example") // PostUserTagRequest | (optional)
configuration := traq.NewConfiguration()
apiClient := traq.NewAPIClient(configuration)
resp, r, err := apiClient.UserTagApi.AddMyUserTag(context.Background()).PostUserTagRequest(postUserTagRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UserTagApi.AddMyUserTag``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `AddMyUserTag`: UserTag
fmt.Fprintf(os.Stdout, "Response from `UserTagApi.AddMyUserTag`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiAddMyUserTagRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
postUserTagRequest | PostUserTagRequest |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UserTag AddUserTag(ctx, userId).PostUserTagRequest(postUserTagRequest).Execute()
ユーザーにタグを追加
package main
import (
"context"
"fmt"
"os"
traq "github.com/traPtitech/go-traq"
)
func main() {
userId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ユーザーUUID
postUserTagRequest := *traq.NewPostUserTagRequest("Tag_example") // PostUserTagRequest | (optional)
configuration := traq.NewConfiguration()
apiClient := traq.NewAPIClient(configuration)
resp, r, err := apiClient.UserTagApi.AddUserTag(context.Background(), userId).PostUserTagRequest(postUserTagRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UserTagApi.AddUserTag``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `AddUserTag`: UserTag
fmt.Fprintf(os.Stdout, "Response from `UserTagApi.AddUserTag`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
userId | string | ユーザーUUID |
Other parameters are passed through a pointer to a apiAddUserTagRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
postUserTagRequest | PostUserTagRequest | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
EditMyUserTag(ctx, tagId).PatchUserTagRequest(patchUserTagRequest).Execute()
自分のタグを編集
package main
import (
"context"
"fmt"
"os"
traq "github.com/traPtitech/go-traq"
)
func main() {
tagId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | タグUUID
patchUserTagRequest := *traq.NewPatchUserTagRequest(false) // PatchUserTagRequest | (optional)
configuration := traq.NewConfiguration()
apiClient := traq.NewAPIClient(configuration)
r, err := apiClient.UserTagApi.EditMyUserTag(context.Background(), tagId).PatchUserTagRequest(patchUserTagRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UserTagApi.EditMyUserTag``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
tagId | string | タグUUID |
Other parameters are passed through a pointer to a apiEditMyUserTagRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
patchUserTagRequest | PatchUserTagRequest | |
(empty response body)
- Content-Type: application/json
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
EditUserTag(ctx, userId, tagId).PatchUserTagRequest(patchUserTagRequest).Execute()
ユーザーのタグを編集
package main
import (
"context"
"fmt"
"os"
traq "github.com/traPtitech/go-traq"
)
func main() {
userId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ユーザーUUID
tagId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | タグUUID
patchUserTagRequest := *traq.NewPatchUserTagRequest(false) // PatchUserTagRequest | (optional)
configuration := traq.NewConfiguration()
apiClient := traq.NewAPIClient(configuration)
r, err := apiClient.UserTagApi.EditUserTag(context.Background(), userId, tagId).PatchUserTagRequest(patchUserTagRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UserTagApi.EditUserTag``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
userId | string | ユーザーUUID | |
tagId | string | タグUUID |
Other parameters are passed through a pointer to a apiEditUserTagRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
patchUserTagRequest | PatchUserTagRequest | |
(empty response body)
- Content-Type: application/json
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]UserTag GetMyUserTags(ctx).Execute()
自分のタグリストを取得
package main
import (
"context"
"fmt"
"os"
traq "github.com/traPtitech/go-traq"
)
func main() {
configuration := traq.NewConfiguration()
apiClient := traq.NewAPIClient(configuration)
resp, r, err := apiClient.UserTagApi.GetMyUserTags(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UserTagApi.GetMyUserTags``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetMyUserTags`: []UserTag
fmt.Fprintf(os.Stdout, "Response from `UserTagApi.GetMyUserTags`: %v\n", resp)
}
This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiGetMyUserTagsRequest 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]
Tag GetTag(ctx, tagId).Execute()
タグ情報を取得
package main
import (
"context"
"fmt"
"os"
traq "github.com/traPtitech/go-traq"
)
func main() {
tagId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | タグUUID
configuration := traq.NewConfiguration()
apiClient := traq.NewAPIClient(configuration)
resp, r, err := apiClient.UserTagApi.GetTag(context.Background(), tagId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UserTagApi.GetTag``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetTag`: Tag
fmt.Fprintf(os.Stdout, "Response from `UserTagApi.GetTag`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
tagId | string | タグUUID |
Other parameters are passed through a pointer to a apiGetTagRequest 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]
[]UserTag GetUserTags(ctx, userId).Execute()
ユーザーのタグリストを取得
package main
import (
"context"
"fmt"
"os"
traq "github.com/traPtitech/go-traq"
)
func main() {
userId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ユーザーUUID
configuration := traq.NewConfiguration()
apiClient := traq.NewAPIClient(configuration)
resp, r, err := apiClient.UserTagApi.GetUserTags(context.Background(), userId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UserTagApi.GetUserTags``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetUserTags`: []UserTag
fmt.Fprintf(os.Stdout, "Response from `UserTagApi.GetUserTags`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
userId | string | ユーザーUUID |
Other parameters are passed through a pointer to a apiGetUserTagsRequest 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]
RemoveMyUserTag(ctx, tagId).Execute()
自分からタグを削除します
package main
import (
"context"
"fmt"
"os"
traq "github.com/traPtitech/go-traq"
)
func main() {
tagId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | タグUUID
configuration := traq.NewConfiguration()
apiClient := traq.NewAPIClient(configuration)
r, err := apiClient.UserTagApi.RemoveMyUserTag(context.Background(), tagId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UserTagApi.RemoveMyUserTag``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
tagId | string | タグUUID |
Other parameters are passed through a pointer to a apiRemoveMyUserTagRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
(empty response body)
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
RemoveUserTag(ctx, userId, tagId).Execute()
ユーザーからタグを削除します
package main
import (
"context"
"fmt"
"os"
traq "github.com/traPtitech/go-traq"
)
func main() {
userId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ユーザーUUID
tagId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | タグUUID
configuration := traq.NewConfiguration()
apiClient := traq.NewAPIClient(configuration)
r, err := apiClient.UserTagApi.RemoveUserTag(context.Background(), userId, tagId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UserTagApi.RemoveUserTag``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
userId | string | ユーザーUUID | |
tagId | string | タグUUID |
Other parameters are passed through a pointer to a apiRemoveUserTagRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
(empty response body)
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]