added api for exporting posts fixes #4