All URIs are relative to https://q.trap.jp/api/v3
Method | HTTP request | Description |
---|---|---|
DeleteOgpCache | Delete /ogp/cache | OGP情報のキャッシュを削除 |
GetOgp | Get /ogp | OGP情報を取得 |
DeleteOgpCache(ctx).Url(url).Execute()
OGP情報のキャッシュを削除
package main
import (
"context"
"fmt"
"os"
traq "github.com/traPtitech/go-traq"
)
func main() {
url := "url_example" // string | OGPのキャッシュを削除したいURL
configuration := traq.NewConfiguration()
apiClient := traq.NewAPIClient(configuration)
r, err := apiClient.OgpApi.DeleteOgpCache(context.Background()).Url(url).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `OgpApi.DeleteOgpCache``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Other parameters are passed through a pointer to a apiDeleteOgpCacheRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
url | string | OGPのキャッシュを削除したいURL |
(empty response body)
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Ogp GetOgp(ctx).Url(url).Execute()
OGP情報を取得
package main
import (
"context"
"fmt"
"os"
traq "github.com/traPtitech/go-traq"
)
func main() {
url := "url_example" // string | OGPを取得したいURL
configuration := traq.NewConfiguration()
apiClient := traq.NewAPIClient(configuration)
resp, r, err := apiClient.OgpApi.GetOgp(context.Background()).Url(url).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `OgpApi.GetOgp``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetOgp`: Ogp
fmt.Fprintf(os.Stdout, "Response from `OgpApi.GetOgp`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiGetOgpRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
url | string | OGPを取得したいURL |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]