1
0
Fork 0

[docs] Batch notification API

pull/1375/head
Igor Wiedler 2012-11-30 16:55:04 +01:00
parent 5317f9e542
commit ae2c3e8ddb
1 changed files with 16 additions and 8 deletions

View File

@ -99,24 +99,32 @@ It may include any of the other fields specified in the [schema](04-schema.md).
#### notify #### notify
The `notify` field allows you to specify an URL template for a URL that will The `notify_batch` field allows you to specify an URL template for a URL that
be called every time a user installs a package. The URL can be either an will be called every time a user installs a package. The URL can be either an
absolute path (that will use the same domain as the repository) or a fully absolute path (that will use the same domain as the repository) or a fully
qualified URL. qualified URL.
An example value: An example value:
{ {
"notify": "/downloads/%package%" "notify_batch": "/downloads/"
} }
For `example.org/packages.json` containing a `monolog/monolog` package, this For `example.org/packages.json` containing a `monolog/monolog` package, this
would send a `POST` request to `example.org/downloads/monolog/monolog` with would send a `POST` request to `example.org/downloads/` with following
following parameters: JSON request body:
* **version:** The version of the package. {
* **version_normalized:** The normalized internal representation of the "downloads": [
version. {"name": "monolog/monolog", "version": "1.2.1.0"},
]
}
The version field will contain the normalized representation of the version
number.
> **Note:** There is a non-batch notification API, but it is deprecated
> for performance reasons.
This field is optional. This field is optional.