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
Value |
Description |
Type |
Namespace |
Remark |
---|---|---|---|---|
data |
Text data |
xs:string |
http://ns.dena.jp/mbga/gameapi/v1 | – |
valid |
Indicates whether the text passed the NG word check |
xs:boolean |
http://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.
Value |
Description |
Remark |
---|---|---|
json |
"application/json; charset=utf8" |
Optional, default value |
_method
Specify the method name to be executed by the overloaded POST.
Value |
Description |
Remark |
---|---|---|
check |
This method checks if inappropriate words are included in the transmitted data |
Required |
API Response
Response Codes
The following is a list of the API response codes.
Request HTTP method |
Response code |
Response message |
Description |
---|---|---|---|
GET |
200 |
OK |
Data was sent successfully and the check for inappropriate words was completed. |
GET |
400 |
Bad Request |
Invalid request data |
GET |
401 |
Unauthorized |
OAuth authorization failed |
GET |
500 |
Internal Server Error |
Failed 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 }
Reference Links
XML Schema Part 2: Datatypes Second Edition
URI Template draft-gregorio-uritemplate-03
Revision History
- 12/11/2012
- Initial release