content_security

package
v1.1.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 3, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package content_security 内容安全

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func Image

func Image(ctx *microapp.MicroApp, payload []byte) (resp []byte, err error)

图片检测

检测图片是否包含违法违规内容。

See: https://microapp.bytedance.com/docs/zh-CN/mini-app/develop/server/content-security/picture-detect

POST https://developer.toutiao.com/api/v2/tags/image/

Example
package main

import (
	"fmt"

	"github.com/21888/microapp"
	"github.com/21888/microapp/apis/content_security"
)

func main() {
	var ctx *microapp.MicroApp

	payload := []byte("{}")
	resp, err := content_security.Image(ctx, payload)

	fmt.Println(resp, err)
}
Output:

func TextAntiDirty

func TextAntiDirty(ctx *microapp.MicroApp, payload []byte) (resp []byte, err error)

内容安全检测

检测一段文本是否包含违法违规内容。

See: https://microapp.bytedance.com/docs/zh-CN/mini-app/develop/server/content-security/content-security-detect

POST https://developer.toutiao.com/api/v2/tags/text/antidirt

Example
package main

import (
	"fmt"

	"github.com/21888/microapp"
	"github.com/21888/microapp/apis/content_security"
)

func main() {
	var ctx *microapp.MicroApp

	payload := []byte("{}")
	resp, err := content_security.TextAntiDirty(ctx, payload)

	fmt.Println(resp, err)
}
Output:

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL