Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
duniter4j
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
clients
java
duniter4j
Commits
8504cf7a
Commit
8504cf7a
authored
7 years ago
by
Benoit Lavenier
Browse files
Options
Downloads
Patches
Plain Diff
[enh] Add documentation on user/profile index
parent
cbd1ae13
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
doc/API.md
+51
-0
51 additions, 0 deletions
doc/API.md
with
51 additions
and
0 deletions
doc/API.md
+
51
−
0
View file @
8504cf7a
...
...
@@ -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
\n
Participation 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/*`
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment