api: clean up the code
api: #{cookie,token}_get is put in main program. user-agent => simple
api, README: add various methods

* setting/get
* os/type/get
* version/get
* folder/setting/get
api: append \n to #json output
api: add comment