This repository has been archived by the owner on Jan 16, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 265
API
Gary Burd edited this page Sep 28, 2015
·
5 revisions
The GoDoc API is comprised of these endpoints:
api.godoc.org/search?q=Query
—Returns search results for Query, in JSON format.
{
"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 packages, in JSON format. The godoc.org/-/index page excludes packages with errors, vendored packages, internal packages and more. This API returns all packages.
{
"results": [
{
"path": "import/path/one"
},
{
"path": "import/path/two"
},
{
"path": "import/path/three"
}
]
}
api.godoc.org/importers/ImportPath
—Returns packages that import ImportPath, in JSON format. Not recursive, direct imports only.
{
"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/imports/ImportPath
—Returns packages that ImportPath imports, in JSON format. Not recursive, direct imports only.
{
"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 to GoDoc.org is also available.