Frost

The Frost Developer Hub

Welcome to the Frost developer hub. You'll find comprehensive guides and documentation to help you start working with Frost as quickly as possible, as well as support if you get stuck.

Get Started    

Getting Started with Frost

This is the description for how to get started with the Frost Publisher API.

Welcome to Frost!

Frost is an easy to use interface that allows publishers to stamp their works to the Po.et platform. It is designed to manage the technical details and let you focus on your work. Frost will allow publishers and developers to interact with the Po.et network while abstracting away the technicalities required for private key infrastructure.

To get started, open a new tab and go to frost.po.et and click on the Login/Sign Up button in the top right corner.

This will take you to a form where you can sign up for a new account.

Now that you have an account, you will be taken to your dashboard. Please check your email and verify your account using the link that we sent. Once the “Verifying” bar goes away, go back to your dashboard and click on the button that says “Get API Key”. If you get an error that you still need to verify your account, log out and then log back in.
Once you are on the API key page, you will see that you already have 1 API key. It looks something like this:

eyJhbGCiOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6ImphbWVzb25AYnRjbWVkaWEub3JnIiwiY2xpZW50X3Rva2VuIjoiN2JkZGU4ZTgtNjU0OS1jODk1LWNlNGYtZjQzymQxNWU5MjFkIiwiaWF0IjoxNVA3OTM4MTkwLCJleHAOijE1MjA3MDI5OTB9.QXOy1pMnNAxpLqdjmAYuTKO2qzmXzvHKMfy5OHOBpjY

You can click the key in your dashboard to copy it.

Now open your terminal. Enter the following commands, replacing the value of 'FROST_TOKEN' below with your own token.
If you don't enter your token, you will get stuck later on.

export FROST_URL="https://api.frost.po.et"
FROST_TOKEN=""

At this point, your terminal should look something like this:

Nice! Now we are ready to create our first work.

Create Work

We are going to register our very first work in Po.et. First, let’s understand the request we are making, and then we will do an example.

curl -H "Content-Type: application/json" -H "token: $FROST_TOKEN" -X POST -d '{"name":"...", "datePublished":"...", "dateCreated": "...","author": "...", "tags": "...", "content": "..."}' $FROST_URL/works

The request starts with curl -H "Content-Type: application/json" -H "token: $FROST_TOKEN". curl tells your computer to make a request to a server. The -H flags tell it that the request contains some header information, in this case that we are sending a json-type application and that we are using the FROST_TOKEN we just set as a way of authenticating our request.

The -X POST tells the server that the request we are submitting is a POST request (that is, we are creating data).

Next, the -d ‘{...}’ tells the server to expect data. The data is contained in fields within the brackets. The fields are:

  • name: The title or name of the work
  • datePublished: The date the work is stamped to Po.et
  • dateCreated: The date the work was created
  • author: The creator of the work
  • tags: Summary tags to help categorize the work
  • content: The body of the work. Currently, Po.et only supports documents.

And finally, the $FROST_URL/works specifies where the request should go. Since we already set FROST_URL to api.frost.po.et, the request with “/works” will go to api.frost.po.et/works meaning it will be stamped to Po.et via Frost.

That’s the anatomy of an API request. Now let’s look at an actual example:

curl -H "Content-Type: application/json" -H "token: $FROST_TOKEN" -X POST -d '{"name":"Hello World", "datePublished":"2018-02-06T14:39:46+00:00", "dateCreated": "2018-02-06T14:39:46+00:00","author": "Jameson", "tags": "test", "content": "Hello, World!"}' $FROST_URL/works

After entering that into your terminal, it will return a workId. This workId is a unique reference to the work you just created, and we can use it to find the work later on.

Now, we have stamped a work to Po.et!


What's Next

If you want to be able to retrieve works that you have put in Frost, continue on.

Retrieving Works with Frost