Skip to content
Snippets Groups Projects
Commit 8504cf7a authored by Benoit Lavenier's avatar Benoit Lavenier
Browse files

[enh] Add documentation on user/profile index

parent cbd1ae13
No related branches found
No related tags found
No related merge requests found
......@@ -103,6 +103,57 @@ For example, a deletion on `message/inbox` should send this document:
#### `user/profile`
- Get an profile, by public key: `user/profile/<pubkey>`
- Add a new profile: `user/profile` (POST)
- Update an existing profile: `user/profile/_update` (POST)
- Delete an existing invitation: `invitation/certification/_delete` (POST)
- Search on profiles: `user/profile/_search` (POST or GET)
A profile document is a JSON document. Mandatory fields are:
- `title`: user name (Lastanem, firstname...)
- `time`: submission time, in seconds
- `issuer`: user public key
- `hash`: hash of the JSON document (without fields `hash` and `signature`)
- `signature`: signature of the JSON document (without fields `hash` and `signature`)
Example with only mandatory fields:
```json
{
"title" : "Pecquot Ludovic",
"description" : "Développeur Java et techno client-serveur\nParticipation aux #RML7, #EIS et #Sou",
"time" : 1488359903,
"issuer" : "2v6tXNxGC1BWaJtUFyPJ1wJ8rbz9v1ZVU1E1LEV2v4ss",
"hash" : "F66D43ECD4D38785F424ADB68B3EA13DD56DABDE275BBE780E81E8D4E1D0C5FA",
"signature" : "3CWxdLtyY8dky97RZBFLfP6axnfW8KUmhlkiaXC7BN98yg6xE9CkijRBGmuyrx3llPx5HeoGLG99DyvVIKZuCg=="
}
```
Some additional fields are `description`, `socials`, `tags` and `avatar` :
```json
{
"title" : "Cédric Moreau",
"description" : "#Duniter developer",
"city" : "Rennes",
"socials" : [ {
"type" : "diaspora",
"url" : "https://diaspora-fr.org/people/f9d13420f9ff013197aa01beea1f31e2"
} ],
"time" : 1487422234,
"tags" : [ "Duniter" ],
"issuer" : "2ny7YAdmzReQxAayyJZsyVYwYhVyax2thKcGknmQy5nQ",
"avatar" : {
"_content_type" : "image/png",
"_content" : "iVBORw0KGgoAAAANSUhEUgAAAGQAAABkC(...)" // base 64 encoding
}
"hash" : "85F527077D060E03ECAC6D1AE38A74CCC900ACAF5D52F194BA34F5A5E8A55139",
"signature" : "WeP7JEwttAoSkHcuiFwo6N4SM0uVakTYBQ09H1+K8/nPFyxO3ak1U9EQ6qaQFoAx9IdDp5qO2EX662wP/pcEAg==",
}
```
#### `user/settings`
### `message/*`
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment