Skip to content

Latest commit

 

History

History
638 lines (402 loc) · 16.2 KB

UserTagApi.md

File metadata and controls

638 lines (402 loc) · 16.2 KB

\UserTagApi

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} ユーザーからタグを削除します

AddMyUserTag

UserTag AddMyUserTag(ctx).PostUserTagRequest(postUserTagRequest).Execute()

自分にタグを追加

Example

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)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiAddMyUserTagRequest struct via the builder pattern

Name Type Description Notes
postUserTagRequest PostUserTagRequest

Return type

UserTag

Authorization

OAuth2, bearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

AddUserTag

UserTag AddUserTag(ctx, userId).PostUserTagRequest(postUserTagRequest).Execute()

ユーザーにタグを追加

Example

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)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
userId string ユーザーUUID

Other Parameters

Other parameters are passed through a pointer to a apiAddUserTagRequest struct via the builder pattern

Name Type Description Notes

postUserTagRequest | PostUserTagRequest | |

Return type

UserTag

Authorization

OAuth2, bearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

EditMyUserTag

EditMyUserTag(ctx, tagId).PatchUserTagRequest(patchUserTagRequest).Execute()

自分のタグを編集

Example

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)
    }
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
tagId string タグUUID

Other Parameters

Other parameters are passed through a pointer to a apiEditMyUserTagRequest struct via the builder pattern

Name Type Description Notes

patchUserTagRequest | PatchUserTagRequest | |

Return type

(empty response body)

Authorization

OAuth2, bearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]

EditUserTag

EditUserTag(ctx, userId, tagId).PatchUserTagRequest(patchUserTagRequest).Execute()

ユーザーのタグを編集

Example

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)
    }
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
userId string ユーザーUUID
tagId string タグUUID

Other Parameters

Other parameters are passed through a pointer to a apiEditUserTagRequest struct via the builder pattern

Name Type Description Notes

patchUserTagRequest | PatchUserTagRequest | |

Return type

(empty response body)

Authorization

OAuth2, bearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetMyUserTags

[]UserTag GetMyUserTags(ctx).Execute()

自分のタグリストを取得

Example

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)
}

Path Parameters

This endpoint does not need any parameter.

Other Parameters

Other parameters are passed through a pointer to a apiGetMyUserTagsRequest struct via the builder pattern

Return type

[]UserTag

Authorization

OAuth2, bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetTag

Tag GetTag(ctx, tagId).Execute()

タグ情報を取得

Example

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)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
tagId string タグUUID

Other Parameters

Other parameters are passed through a pointer to a apiGetTagRequest struct via the builder pattern

Name Type Description Notes

Return type

Tag

Authorization

OAuth2, bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetUserTags

[]UserTag GetUserTags(ctx, userId).Execute()

ユーザーのタグリストを取得

Example

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)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
userId string ユーザーUUID

Other Parameters

Other parameters are passed through a pointer to a apiGetUserTagsRequest struct via the builder pattern

Name Type Description Notes

Return type

[]UserTag

Authorization

OAuth2, bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

RemoveMyUserTag

RemoveMyUserTag(ctx, tagId).Execute()

自分からタグを削除します

Example

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)
    }
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
tagId string タグUUID

Other Parameters

Other parameters are passed through a pointer to a apiRemoveMyUserTagRequest struct via the builder pattern

Name Type Description Notes

Return type

(empty response body)

Authorization

OAuth2, bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]

RemoveUserTag

RemoveUserTag(ctx, userId, tagId).Execute()

ユーザーからタグを削除します

Example

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)
    }
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
userId string ユーザーUUID
tagId string タグUUID

Other Parameters

Other parameters are passed through a pointer to a apiRemoveUserTagRequest struct via the builder pattern

Name Type Description Notes

Return type

(empty response body)

Authorization

OAuth2, bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]