typeform-js
typeform client for node and the browser
Installation
clone this repo
Usage
import (ES6) or require the package and set your API-key for authentication. Every method of the library returns a promise tha will be fulfilled with typeform.io's response.
src folder contain the ES6 version. dist folder contains the ES5 version.
; let typeform = ;
Available endpoints
base
The base endpoint response contains information about the API.
example
typeform;
forms
Create a form
arguments:
Command | Type | Optional | Description |
---|---|---|---|
Title | string | no | form title |
Fields | array | no | form fields |
Extra | object | yes | extra options |
example
typeformform "My first typeform" "type": "short_text" "question": "What is your name?" "branding": false ;
Get a form
arguments:
Command | Type | Optional | Description |
---|---|---|---|
Id | string | no | form id |
example:
typeformform;
images
send an image
arguments:
Command | Type | Optional | Description |
---|---|---|---|
Url | string | no | url to sent |
example
typeform;
Get an image
arguments:
Command | Type | Optional | Description |
---|---|---|---|
Id | string | no | image id |
example:
typeformimage;
designs
Create a design
arguments:
Command | Type | Optional | Description |
---|---|---|---|
Colors | object | no | design colors |
Font | string | no | google web font for this design |
example
typeform;
Get a design
arguments:
Command | Type | Optional | Description |
---|---|---|---|
Id | string | no | design id |
example:
typeformdesign;
urls
Create a new url
arguments:
Command | Type | Optional | Description |
---|---|---|---|
form_id | object | no | actual id |
example
typeform;
Get a url
arguments:
Command | Type | Optional | Description |
---|---|---|---|
Id | string | no | url id |
example:
typeformurl;
Get a url
arguments:
Command | Type | Optional | Description |
---|---|---|---|
Old_id | string | no | current url id |
New_id | string | no | new url id |
example:
typeformurl;
TODO
- fields Objects?