Skip to content

Instantly share code, notes, and snippets.

@Kogoro
Last active January 28, 2016 02:50
Show Gist options
  • Save Kogoro/5057c37d35832bceab5a to your computer and use it in GitHub Desktop.
Save Kogoro/5057c37d35832bceab5a to your computer and use it in GitHub Desktop.
Contact JSON with portable contacts draft in mind
// http://portablecontacts.net/draft-spec.html#structure
var contact = {
userID: '',
displayName: '',
name: {
formatted: '',
familyName: '',
givenName: '',
middleName: '',
honorificPrefix: '',
honorificSuffix: '',
},
nickname: '',
avatar: '',
gravatar: false,
created_at: '',
modified_at: '',
birthday: '',
anniversary: '',
gender: '',
note: '',
preferredUsername: '',
utcOffset: '+01:00 Berlin',
connected: false,
aboutMe: '',
currentLocation: '',
relationshipStatus: '',
smoker: false,
status: '',
emails: [
{
value: '[email protected]',
type: 'work',
primary: true
},
{
value: '',
type: 'home',
primary: true
},
{
value: '',
type: 'other',
primary: true
}
],
urls: [
{
value: 'http://test.com',
type: 'work',
primary: true
},
{
value: '',
type: 'blog',
primary: true
},
{
value: '',
type: 'profile',
primary: true
}
],
phoneNumbers: [
{
value: '',
type: 'work',
primary: true
},
{
value: '',
type: 'mobile',
primary: true
},
{
value: '',
type: 'fax',
primary: true
},
{
value: '',
type: 'pager',
primary: true
}
],
ims: [
{
value: '',
type: 'skype',
primary: true
}
],
adresses: [
{
formatted: '',
streetAdress: '',
locality: '',
region: '',
postalCode: '',
country: ''
}
],
organizations: [
{
name: '',
department: '',
title: '',
type: 'job',
startDate: '',
endDate: '',
location: '',
description: ''
}
],
accounts: [
{
domain: '',
username: '',
userid: '',
}
],
languages: [
{
value: 'English',
primary: true
},
{
value: 'German',
primary: false
}
]
}
@Kogoro
Copy link
Author

Kogoro commented Jan 28, 2016

Not 100% of the specification but the necessary parts for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment