NGWord
ngword.check
This is an API for verifying whether or not contain any text that violates the operations policy.
API definitions
| REST Base URI | http://app.mbga-platform.jp/social/api/restful/v2 ( Service ) http://app.sb.mbga-platform.jp/social/api/restful/v2 ( Sandbox ) |
| REST HTTP Method | POST (overload POST) |
| REST URI Fragment | /ngword |
| REST Query Parameters | Check-NGWord-Request-Parameters |
| Return Object | NGWord |
Approval
| type | permission | description |
|---|---|---|
| ANONYMOUS | false | Unauthorized access |
| SECURITY_TOKEN | false | Authorization using a security token |
| OAUTH_MOBILE | false | Authorization using an OAuth Token issued for a mobile device |
| OAUTH_CONSUMER | true | Authorization using a Consumer Request |
RESTful API response codes
| HTTP Status Code | HTTP Status Message | JSON-RPC Error Codes | Meaning |
|---|---|---|---|
| 200 | OK | – | Data successfully acquired |
| 400 | Bad Request | -32700, -32600, -32601, -32602, 400 | Corrupt request data on the client side |
| 401 | Unauthorized | 401 | Authorization error |
| 403 | Forbidden | 403 | The resource exists, but access is not possible due to a reason other than an authorization error |
| 404 | Not Found | 404 | The resource doesn’t exist |
| 405 | Method Not Allowed | 405 | That operation is not allowed |
| 500 | Internal Server Error | -32603 | An error on the API server side |
| 503 | Service Unavailable | – | The API cannot be used temporarily |
JSON-RPC error codes
These are values are included in the code field of the Error object when an error has occurred.
| RPC Code | Meaning |
|---|---|
| -32700 (Parse error) | Invalid JSON format |
| -32600 (Invalid Request) | Invalid JSON-RPC request |
| -32601 (Method not found) | The method either doesn’t exist or is an unusable method |
| -32602 (Invalid params) | The method either doesn’t exist or is an unusable method |
| -32603 (Internal server error) | An error on the API server side |
| 400 (Bad Request) | A bad request on the client side that does not correspond to any other error |
| 401 (Unauthorized) | Authorization error |
| 403 (Forbidden) | The resource exists, but access is not possible due to a reason other than an authorization error |
| 404 (Not Found) | The resource doesn’t exist |
| 405 (Method Not Allowed) | That operation is not allowed |
Data types
Check-NGWord-Request-Parameters
Parameters are specified as Query Strings.
| Name | Type | Description |
|---|---|---|
| _method | String | Required, Only 'check' is specifiable. |
Base data types
- Standard-Request-Parameters
Starndard-Request-Parameters
The following is a list of the supported fields.
| Name | Type | Description |
|---|---|---|
| format | String | Optional Only 'json' is specifiable. |
See 6.1 Standard Request Parameters - OpenSocial Core API Server Specification for details.
NGWord
| Name | Type | Description |
|---|---|---|
| data | String | A string for verification |
| valid | Boolean | Determines whether or not the NGWord check was passed |
Sample data
RESTful API
Arbitrary text is verified to ensure that it does not contain any NG words.
POST /social/api/restful/v2/ngword?_method=check
Host: app.sb.mbga-platform.jp
{ "data" : "If words such as "kill" are posted on a message board or elsewhere, the management team may delete these words." }
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
"valid" : false
}
See Also
OpenSocial Core API Server Specification 1.0
OpenSocial Core Data Specification 1.0
OpenSocial Social API Server Specification 1.0
OpenSocial Social Data Specification 1.0
Revision History
- 12/2010
- Initial Release.
- 10/12/2010
- Modified the wording of ngword.check