From b0951be2f727a196a38c69132d5e00f7ffb6e404 Mon Sep 17 00:00:00 2001 From: tateisu Date: Tue, 15 May 2018 18:30:27 +0900 Subject: [PATCH] (API) profile metadata fields (#611) * add fields_attributes in /api/v1/accounts/update_credentials * add fields in Accounts and verify_credentials * add fields in Accounts and verify_credentials * add fields in Accounts and verify_credentials --- Using-the-API/API.md | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/Using-the-API/API.md b/Using-the-API/API.md index 8cf78f30..834d361c 100644 --- a/Using-the-API/API.md +++ b/Using-the-API/API.md @@ -84,11 +84,12 @@ Returns an [Account](#account). Returns the authenticated user's [Account](#account) with an extra attribute `source` which contains these keys: -| Attribute | Description | -| ----------- | -------------------------------------------------------- | -| `privacy` | Selected preference: Default privacy of new toots | -| `sensitive` | Selected preference: Mark media as sensitive by default? | -| `note` | Plain-text version of the account's `note` | +| Attribute | Description | +| ----------- | -------------------------------------------------------------- | +| `privacy` | Selected preference: Default privacy of new toots | +| `sensitive` | Selected preference: Mark media as sensitive by default? | +| `note` | Plain-text version of the account's `note` | +| `fields` | Array of profile metadata, each element has 'name' and 'value' | #### Updating the current user: @@ -103,6 +104,11 @@ Form data: | `avatar` | An avatar for the user (encoded using `multipart/form-data`) | yes | | `header` | A header image for the user (encoded using `multipart/form-data`) | yes | | `locked` | Manually approve followers? | yes | +| `fields_attributes[0][name]` | (2.4 or later) Label of profile metadata field. | yes | +| `fields_attributes[0][value]` | (2.4 or later) Value of profile metadata field. | yes | + +> **Note:** [0]…[3] is allowed in parameter name of fields_attributes. [] is not allowed. + Returns the authenticated user's [Account](#account). @@ -721,6 +727,7 @@ ___ | `header` | URL to the header image | no | | `header_static` | URL to the header static image (gif) | no | | `moved` | If the owner decided to switch accounts, new account is in this attribute | yes | +| `fields` | Array of profile metadata field, each element has 'name' and 'value' | yes | ### Application