diff options
| author | Felix Hanley <felix@userspace.com.au> | 2016-01-29 01:49:00 +0000 |
|---|---|---|
| committer | Felix Hanley <felix@userspace.com.au> | 2016-01-29 01:49:00 +0000 |
| commit | cbad86e777b4f0256a2e521c2ac52a9cf2340c8f (patch) | |
| tree | c0211f29b278c2b346ce079266b6b407e4c9b0c4 /README.md | |
| parent | ca192e88bc58d7fe4a24d4efddd2aec9c3e3cf24 (diff) | |
| download | go-dict2rest-cbad86e777b4f0256a2e521c2ac52a9cf2340c8f.tar.gz go-dict2rest-cbad86e777b4f0256a2e521c2ac52a9cf2340c8f.tar.bz2 | |
Update readme
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 32 |
1 files changed, 22 insertions, 10 deletions
@@ -1,9 +1,11 @@ # dict2rest -A simple proxy service to provide an HTTP (REST) interface to a Dict protocol -(RFC 2229) server. Written in Go. +A simple proxy service to provide an HTTP (REST) interface to a +[Dict protocol (RFC 2229)](http://tools.ietf.org/html/rfc2229) for the Dict +protocol. Written in Go. -See [RFC 2229](http://tools.ietf.org/html/rfc2229) for the Dict protocol. +An instance can _usually_ be access from +http://felixhanley.info/projects/lahu/dictionary/ ## Installation @@ -37,17 +39,25 @@ Usage of dict2rest: ## Usage -The URL endpoints try to match the commands defined in RFC 2229 and are -currently: +The URL endpoints try to match the commands defined in RFC 2229. Results are +JSON and have the following format (newlines added for readability): -GET /define/{word} -GET /define/{word}?dict=wn GET /databases -Where 'wn' is one of the names of the server's dictionaries. +```json +[ + { + "name":"eng-lhu", + "description":"English-Lahu Dictionary ver. 20160128" + }, { + "name":"lhu-eng", + "description":"Lahu-English Dictionary ver. 20160128" + } +] +``` -Definitions are returned as JSON in the following format (newlines added for -readability): +GET /define/{word} +GET /define/{word}?dict=eng-lhu ```json [ @@ -59,6 +69,8 @@ readability): ] ``` +Where 'eng-lhu' is one of the names of the server's dictionaries. + RFC 2229 error codes are passed through as JSON: ```json |
