Libraries
| Method | Parameters | Description |
|---|---|---|
| getkey | String, String | Retrieve an API key or create one. |
| using | String | Specify an existing key to use. |
| project | String | Assign data to a project by name. |
| domain | String | Assign data to a domain. |
| subdomain | String | Assign data to a subdomain. |
| list | String | Directive to store data in a list. |
| read | [Callback] | Retrieves data. Callback is optional. Returns Promise or Null if valid callback is supplied. |
| write | String | Stores data using HTTP GET |
| post | text/plain | Stores data using HTTP POST |
JavaScript
Include prefs.us Javascript library in your project
Get the API key ready. All data will be linked to that key. Get as many keys as you need. The method below will either return the existing key or create a new one.
Use .using(apikey) method to specify the API key if already have one pre-generated.
PHP
TODO: PHP code and examples
Python
TODO: python code and examples
Java
Import prefsus.jar in your project
Get the API key ready. All data will be linked to that key. Get as many keys as you need. The method below will either return the existing key or create a new one.
PrefsUs prefs = new PrefsUs();
String apikey = prefs.getkey('chosen-key-id', 'chosen-seed-phrase');
//
// use or store the API key somewhere safe
//
Use .using(apikey) method to specify the API key if already have one pre-generated.