Skip to content

Contact

Jonathan Montane edited this page Jan 31, 2017 · 1 revision

A Contact record represents the maintainer of the API. It has a few descriptive fields, which are name, url, email.

Import

/* if in src/ */
import Contact from './models/Contact'

Interface

Contact extends Immutable.Record using the following pattern:

import { Record } from 'immutable'

const Contact = Record({
    name: null,
    url: null,
    email: null
})

Fields

Contact.name
  • Contact.name is the name of the maintainer or team of maintainers.
Contact.url
  • Contact.url is the url at which more information about the team can be found.
Contact.email
  • Contact.email is the email at which people can contact the maintaining team.

Example

Please note that this example is abstract, and is there purely to represent the different interactions with Contact. The data may be non-sensical.

import Contact from './models/Contact'

const contact = new Contact({
    name: 'John Smith',
    url: 'http://example.com/maintainers',
    email: 'john.smith@...'
})