Description
Updates the profile information for the user corresponding to username
. To use a profile, you need to register as a user in advance.
Help page
User profile - Pixela Help Center
HTTP Method , API endpoint
PUT /@<username>
Request Header
Key | Description |
---|---|
X-USER-TOKEN | [required] It is the authentication token specified at the time of user registration. |
Request Body
Key | Type | Description |
---|---|---|
displayName | string | [optional] The user's name for the display. It corresponds to 1 in the image above. |
gravatarIconEmail | string | [optional] This is the email address registered as an icon in Gravatar. It affects the display of 2 in the image above. |
title | string | [optional] The title of the user. It corresponds to 3 in the image above. If this user is not a Pixela Supporter, updating this item will not appear on the page. |
timezone | string | [optional] Specify the user's time zone as TZ database name (not Time zone abbreviation). The initial value is UTC . This affects the daily PV count on the profile page. It corresponds to 4 in the image above. |
aboutURL | string | [optional] Users can only show one external link to this profile page. It corresponds to 5 in the image above. If this user is not a Pixela Supporter, updating this |
contributeURLs | array[string] | [optional] It corresponds to 6 in the image above. If this user is contributing to Pixela through activities such as publishing third-party libraries or articles that leverage Pixela, this should be the URL on which this is based. If at least one URL is set for this item, this user will be flagged as Pixela Breeder. |
pinnedGraphID | string | [optional] Users can pin one of their own graphs to their profile page. The ID of the chart you want to pin. It affects the display of 7 in the image above. |
Possible errors by HTTP response status code
400 Bad Request
- This is an error if there is some mistake in your request. Unless the mistake is corrected, the request will not succeed.
404 Not Found
- This error occurs when your request destination does not exist.
- This error also occurs when authentication to the request destination is not successful.
500 Internal Server Error
- Status in the event of an unexpected error. Retrying the request may be successfully processed.
503 Service Unavailable
- This error occurs when Pixela is temporarily unavailable. Please take a moment and retry your request.
- If the response body contains
"isRejected":true
, it indicates that the request was rejected 25% of the time. In this case, the request can be retried until it succeeds.- You can avoid this rejection by becoming a Pixela supporter. See this page for more information.
Example
$ curl -X PUT https://pixe.la/@a-know -H 'X-USER-TOKEN:thisissecret' -d '{"displayName":"a-know"}' {"message":"Success.","isSuccess":true} $ curl -X PUT https://pixe.la/@a-know -H 'X-USER-TOKEN:thisissecret' -d '{"aboutURL":"https://home.a-know.me/","contributeURLs":["https://pixe.la/","https://github.com/a-know/pi","https://blog.a-know.me/archive/category/Pixela"]}' {"message":"Success.","isSuccess":true}