From 139ade32639c00352015ca76b816c1d46caa2ea3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20M=C3=BCller?= Date: Tue, 18 Feb 2014 13:59:43 +0100 Subject: [PATCH] Wording --- API.md | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/API.md b/API.md index a30f05b..ddfd20c 100644 --- a/API.md +++ b/API.md @@ -1,4 +1,3 @@ - # NoteHub API **Version 1.3, status: released.** @@ -72,7 +71,7 @@ Parameter | Explanation | Type `note` | Text to publish | **required** `pid` | Publisher ID | **required** `signature` | Signature | **required** -`password` | MD5 hash of a plain password for editing | *optional* +`password` | Secret token (plain or hashed) | *optional* `version` | Used API version | **required** `theme` | Theme name | *optional* `text-font` | Text font name | *optional* @@ -82,7 +81,7 @@ The Signature is the MD5 hash of the following string concatenation: pid + psk + note -The signature serves as a proof, that the request is authentic and will be issued by the publisher corresponding to the provided PID. +The signature serves as a proof, that the request is authentic and will be issued by the publisher corresponding to the provided PID. Please note, that _all_ of the values used in the signature computation, should be identical to the values passed with the request itself. The parameters specifying the theme name and fonts are optional and only impact the URLs returned back. @@ -110,19 +109,20 @@ To update a note, an `PUT` request must be issued to the following URL: with the following parameters: -Parameter | Explanation | Type ---- | --- | --- -`noteID` | Note-ID | **required** -`note` | New text | **required** -`pid` | Publisher ID | **required** -`signature` | Signature | **required** -`password` | MD5 hash of the plain password used for publishing| **required** -`version` | Used API version | **required** +Parameter | Explanation | Type +--- | --- | --- +`noteID` | Note-ID | **required** +`note` | New text | **required** +`pid` | Publisher ID | **required** +`signature` | Signature | **required** +`password` | Secret token (plain or hashed) | **required** +`version` | Used API version | **required** The Signature is the MD5 hash of the following string concatenation: pid + psk + noteID + note + password +Please note, that all of the values used in the signature computation, should be identical to the values passed with the request itself. The response of the server will contain the fields `longURL`, `shortURL`, `status`.