Skip to main content

NGWord

Overview​

The NGWord API is provided in order to check if text that appears in game posts violates Mobage management policy.


NGWord Object Fields​

ValueDescriptionTypeNamespaceRemark
dataText dataxs:stringhttp://ns.dena.jp/mbga/gameapi/v1–
validIndicates whether the text passed the NG word checkxs:booleanhttp://ns.dena.jp/mbga/gameapi/v1–

If valid is true, the text data can be posted without any problems.


API Request​

HTTP Methods​

Proxy model

  • POST (overloaded POST)
    • Input text verification

Trusted model

  • POST (overloaded POST)
    • Input text verification

An overloaded POST uses the POST method to explicitly access a method that is not part of the RESTful API interface (GET, POST, PUT, DELETE). In this case, it is used to explicitly specify that method in a query parameter.

The NGWord API uses the _method query parameter in the specification which will be executed by the overloaded POST.

Endpoint URL​

  • Sandbox environment

    http://sb.sp.app.mbga.jp/api/restful/v1/ngword
  • Production environment

    http://sp.app.mbga.jp/api/restful/v1/ngword

URI Template Parameters​

None.


Query Parameters​

The following query parameters can be specified.

format​

The response format is as shown below.

ValueDescriptionRemark
json"application/json; charset=utf8"Optional, default value

_method​

Specify the method name to be executed by the overloaded POST.

ValueDescriptionRemark
checkThis method checks if inappropriate words are included in the transmitted dataRequired

API Response​

Response Codes​

The following is a list of the API response codes.

Request HTTP methodResponse codeResponse messageDescription
GET200OKData was sent successfully and the check for inappropriate words was completed.
GET400Bad RequestInvalid request data
GET401UnauthorizedOAuth authorization failed
GET500Internal Server ErrorFailed because of an API problem

Notes​

None.

Examples​

NGWord check​

This example checks to see if the text contains any inappropriate words.

Request Format​

POST /api/restful/v1/ngword?_method=check&format=json
Content-Type: application/json; charset=utf8

{
"data" : "Posts using words such as "kill" on bulletin boards may be deleted by the administrator"
}

Response Format​

200 OK

{
"totalResults" : 1,
"itemsPerPage" : 1,
"ngword": {
"valid": false,
},
"startIndex": 1
}

XML Schema Part 2: Datatypes Second Edition
URI Template draft-gregorio-uritemplate-03

Revision History​

  • 03/01/2012
    • Initial release