Pixela API Document

API Document for Pixela ( https://pixe.la/ ) .

PUT - /@<username>

Description

Updates the profile information for the user corresponding to username . To use a profile, you need to register as a user in advance.

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

f:id:a-know:20201015183011p:plain

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. 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.

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}