Class: Builder maps.nyc.gov

nyc.jcard.Builder

new Builder()

Class for creating JCards for submission to the server
Source:

Methods

add(prop)

Add a JCard property
Parameters:
Name Type Description
prop Array The JCard property to add
Source:

address(address) → {Array}

Create a JCard address property
Parameters:
Name Type Description
address nyc.jcard.Address The address to create
Source:
Returns:
The JCard address property
Type
Array

email(email) → {Array}

Create a JCard email property
Parameters:
Name Type Description
email nyc.jcard.Email The email to create
Source:
Returns:
The JCard email property
Type
Array

geography(geo) → {Array}

Create a JCard geography property
Parameters:
Name Type Description
geo nyc.jcard.Geo The geography to create
Source:
Returns:
The JCard geography property
Type
Array

jcard() → {Array}

Create the JCard
Source:
Returns:
The JCard
Type
Array

json() → {string}

Gat a JSON representation of the JCard
Source:
Returns:
The JSON representation of the JCard
Type
string

name(name) → {Array}

Create a JCard name property
Parameters:
Name Type Description
name nyc.jcard.Name The name to create
Source:
Returns:
The JCard name property
Type
Array

note(note) → {Array}

Create a JCard note property
Parameters:
Name Type Description
note string The note to create
Source:
Returns:
The JCard note property
Type
Array

organization(organization) → {Array}

Create a JCard organization property
Parameters:
Name Type Description
organization nyc.jcard.Organization The organization to create
Source:
Returns:
The JCard organization property
Type
Array

parsePhone(phone) → {Array}

Create a JCard phone property from a U.S.A phone number string
Parameters:
Name Type Description
phone string The phone to create
Source:
Returns:
The JCard phone property
Type
Array

phone(phone) → {Array}

Create a JCard phone property
Parameters:
Name Type Description
phone nyc.jcard.Phone The phone to create
Source:
Returns:
The JCard phone property
Type
Array

revision(date) → {Array}

Create a JCard date property
Parameters:
Name Type Description
date Date The date to create
Source:
Returns:
The JCard date property
Type
Array

timezone(timezone) → {Array}

Create a JCard timezone property
Parameters:
Name Type Description
timezone string The timezone to create
Source:
Returns:
The JCard timezone property
Type
Array

url(url) → {Array}

Create a JCard URL property
Parameters:
Name Type Description
url string The URL to create
Source:
Returns:
The JCard URL property
Type
Array