iChing API returns JSON payloads containing a specific or random iChing reading.
Content is sourced from the Wilhelm / Baynes translation of the iChing.
This is an imperfect project which is likely to have errors, please feel free to submit issues or pull requests with corrections.
Returned sequences for the lines go from bottom to top 123456 where 1 is the first (bottom) line and 6 is the last (top) line
?lines=997876
Get specific hexagram (6,7,8,9 notation))?cast=yarrow
Get random hexagram using method (threecoin|yarrow)
The aged numbers for each line the hexagram represented as 6,7,8, or 9
Name of the upper trigram
Name of the lower trigram
English title of the hexagram
Chinese transliterated title of the hexagram
Text of the image
Text of the judgement
Text of the lines
Hexagram unicode character
Hexagram number 1-64
Text of the Wilhelm / Baynes description for the hexagram
Text of the Wilhelm / Baynes description for the judgement
Text of the Wilhelm / Baynes description for the image
Text of the Wilhelm / Baynes description for the lines (only returns descriptions for lines in the reading)
This API uses a sqlite database to store the iChing content which can be found in the main directory: `./iChing.sqlite`. Feel free to extract and use that database as you like. If you end up using it for multiple projects it may be wise to set up a separate repo containing only the database so its easier to update many consumers with corrections.
- Find a way to cleanly add the readings for "all lines 9" or "All lines 6" on hexagrams 1 and 2. These have been excluded for now.
- Implement versioning to allow upgrades without breaking old clients
- Port from PHP to something a more modern and less butts.