Kanji

The kanji route can be used to store kanji/Chinese characters. All string parameters can be entered in roman letters or furigana.

The accepted parameters are:

Parameter Notes Type Example
id A unique identifier for the kanji. Read-only. Increment 1
kanji The kanji. string
onyomi The Chinese reading of the kanji. This is traditionally written in katakana, but may be written in roman letters or hiragana. string ガク
kunyomi The Japanese reading of the word. This is traditionally written in hiragana, but may be written in roman letters or katakana. string まな
meaning The meaning of the kanji. string study, learning
compounds A list of important compound words that use this kanji. string 学校、大学
created_at A year-month-day hour-minute-second value showing when the information was created. Read-only. timestamp 2017-04-07 17:38:04
updated_at A year-month-day hour-minute-second value showing when the information was updated. Read-only. timestamp 2017-04-08 12:45:02

GET requests

To get all entries, point a GET request to:

http://localhost:8888/kanjis

To get a single entry, point a GET request to:

http://localhost:8888/kanjis/{id}

A successful response will look like:

{
"id": 1,
"kanji": "学",
"onyomi": "ガク",
"kunyomi": "まな",
"meaning": "study, learning",
"compounds": "学校、大学",
"created_at": "2017-04-07 17:50:15",
"updated_at": "2017-04-07 17:50:15"
}

POST requests

To post an entry, point a POST request to

http://localhost:8888/kanjis

A successful POST will return:

{
"created": true
}

Any parameter left blank will default to an empty string.

PUT requests

To update an entry, point a PUT request to

http://localhost:8888/kanjis/{id}

You may update as many or as few parameters as you'd like.

A successful PUT will return:

{
"updated": true
}

DELETE requests

To delete an entry, point a DELETE request to

http://localhost:8888/kanjis/{id}

A successful DELETE will return:

{
"deleted": true
}

results matching ""

    No results matching ""