💨

Getting started with Pixela

Pixela provides only RESTish Web API, but it is not so difficult to start using.
Let's dive into the Pixela world from the console on your machine!

1. Create your user account

Request Users API as an HTTP POST. API document
$ curl -X POST https://pixe.la/v1/users -d '{"token":"thisissecret", "username":"test-user-name", "agreeTermsOfService":"yes", "notMinor":"yes"}'
{"message":"Success. Let's visit https://pixe.la/@test-user-name , it is your profile page!","isSuccess":true}
Shell

2. Create your first graph

Request Graphs API as an HTTP POST. API document
$ curl -X POST https://pixe.la/v1/users/test-user-name/graphs -H 'X-USER-TOKEN:thisissecret' -d '{"id":"my-first-graph","name":"My first graph","unit":"pages","type":"int","color":"shibafu","timezone":"Asia/Tokyo"}'
{"message":"Success.","isSuccess":true}
Shell

3. Try to show the graph

Access to https://pixe.la/v1/users/test-user-name/graphs/my-first-graph by using web-browse. This is equivalent to requesting Graphs API as an HTTP GET.
This is what it looks like when access to https://pixe.la/v1/users/test-user-name/graphs/my-first-graph in a web-browser.
This is what it looks like when access to https://pixe.la/v1/users/test-user-name/graphs/my-first-graph in a web-browser.
You could create your first graph which no values recorded for any dates yet.

4. Post a value for a date

Reqeust Pixels API as an HTTP POST. API document
$ curl -X POST https://pixe.la/v1/users/test-user-name/graphs/my-first-graph -H 'X-USER-TOKEN:thisissecret'  -d '{"date":"20211212","quantity":"5"}'
{"message":"Success.","isSuccess":true}{"message":"Success.","isSuccess":true}
Shell

5. Try to show the graph, again!

Now let's access to https://pixe.la/v1/users/test-user-name/graphs/my-first-graph by using web-browser, again!
This is what it looks like when access to https://pixe.la/v1/users/test-user-name/graphs/my-first-graph in a web-browser again.
This is what it looks like when access to https://pixe.la/v1/users/test-user-name/graphs/my-first-graph in a web-browser again.
You can see the color of pixel at the position of the date specified in your Pixels API requested has changed, you know?

6. Find out more information

Try to add .html to this URL and access by using web-browser.
This is what it looks like when access to https://pixe.la/v1/users/test-user-name/graphs/my-first-graph.html in a web-browser.
This is what it looks like when access to https://pixe.la/v1/users/test-user-name/graphs/my-first-graph.html in a web-browser.
Then, you can see various detailed information about this graph. You can also see tooltips by hovering the mouse cursor over each pixel in the graph displayed on this page.
This small graph is called Retina .
This small graph is called Retina .