Add lines_api.rst and patches_api.rst