Adds two more API endpoints to README.
Closes #109.
diff --git a/README.markdown b/README.markdown
index 001be7e..2b2b86e 100644
--- a/README.markdown
+++ b/README.markdown
@@ -42,7 +42,24 @@
The GoDoc API is comprised of these endpoints:
-**api.godoc.org/importers/`ImportPath`**—Returns packages that import ImportPath, in JSON format.
+**api.godoc.org/search?q=`Query`**—Returns search results for Query, in JSON format.
+
+```json
+{
+ "results": [
+ {
+ "path": "import/path/one",
+ "synopsis": "Package synopsis is here, if present."
+ },
+ {
+ "path": "import/path/two",
+ "synopsis": "Package synopsis is here, if present."
+ }
+ ]
+}
+```
+
+**api.godoc.org/packages**—Returns all indexed packages, in JSON format.
```json
{
@@ -52,24 +69,52 @@
},
{
"path": "import/path/two"
+ },
+ {
+ "path": "import/path/three"
}
]
}
```
-**api.godoc.org/search?q=`Query`**—Returns search results for Query, in JSON format.
+**api.godoc.org/importers/`ImportPath`**—Returns packages that import ImportPath, in JSON format. Not recursive, direct imports only.
```json
{
"results": [
{
"path": "import/path/one",
- "synopsis": "Package synopsis is here."
+ "synopsis": "Package synopsis is here, if present."
},
{
"path": "import/path/two",
- "synopsis": "Package synopsis is here."
+ "synopsis": "Package synopsis is here, if present."
}
]
}
```
+
+**api.godoc.org/imports/`ImportPath`**—Returns packages that ImportPath imports, in JSON format. Not recursive, direct imports only.
+
+```json
+{
+ "imports": [
+ {
+ "path": "import/path/one",
+ "synopsis": "Package synopsis is here, if present."
+ },
+ {
+ "path": "import/path/two",
+ "synopsis": "Package synopsis is here, if present."
+ }
+ ],
+ "testImports": [
+ {
+ "path": "import/path/three",
+ "synopsis": "Package synopsis is here, if present."
+ }
+ ]
+}
+```
+
+A plain text interface is documented at <http://godoc.org/-/about>.