Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sample schema for PATCHing a contact #1

Open
AbhiAgarwal opened this issue Aug 8, 2017 · 0 comments
Open

sample schema for PATCHing a contact #1

AbhiAgarwal opened this issue Aug 8, 2017 · 0 comments

Comments

@AbhiAgarwal
Copy link
Member

AbhiAgarwal commented Aug 8, 2017

PATCH to https://dev-dot-newsai-1166.appspot.com/api/database-contacts/[email protected]

The schema is literally the same as how you get it. You have to PATCH all the content when you PATCH it. Meaning if you make a change to organizations then you should still send everything back to the server.

I.e. don't just patch this when you change organizations:

{
	"organizations": [{
		"startDate": "2017",
		"name": "Axios",
		"title": "Technology Reporter"
	}]
}

PATCH everything not just organizations.

{
	"organizations": [{
		"startDate": "2017",
		"name": "Axios",
		"title": "Technology Reporter"
	}],
	"digitalFootprint": {
		"topics": [{
			"value": "AngelList",
			"provider": "klout"
		}, {
			"value": "Lyft",
			"provider": "klout"
		}, {
			"value": "Technology",
			"provider": "klout"
		}, {
			"value": "Uber",
			"provider": "klout"
		}, {
			"value": "Venturebeat",
			"provider": "klout"
		}],
		"scores": [{
			"type": "general",
			"value": 60,
			"provider": "klout"
		}]
	},
	"socialProfiles": [{
		"username": "kia-kokalitcheva",
		"typeId": "angellist",
		"url": "https://angel.co/kia-kokalitcheva",
		"typeName": "AngelList",
		"type": "angellist",
		"id": "281956"
	}, {
		"username": "imkialikethecar",
		"typeId": "github",
		"url": "https://github.com/imkialikethecar",
		"typeName": "Github",
		"type": "github"
	}, {
		"bio": "UC Berkeley senior, coffee lover, music listener, Wednesday noon dancer, and other things :)",
		"typeId": "google",
		"url": "https://plus.google.com/118229697669024257661",
		"typeName": "GooglePlus",
		"type": "google",
		"id": "118229697669024257661"
	}, {
		"username": "imkialikethecar",
		"typeId": "gravatar",
		"url": "https://gravatar.com/imkialikethecar",
		"typeName": "Gravatar",
		"type": "gravatar",
		"id": "61401281"
	}, {
		"username": "imkialikethecar",
		"typeId": "klout",
		"url": "http://klout.com/imkialikethecar",
		"typeName": "Klout",
		"type": "klout",
		"id": "32369627087175405"
	}, {
		"username": "kiakokalitcheva",
		"bio": "(Note: if you're reaching out about tech news, please do so to my work email, not on LinkedIn. Thanks.) UC Berkeley alumna, (Silicon) Valley girl, and technology reporter who took a winding path to find her calling. Personal interests (sometimes addictions) include media, publications, pop culture, fashion, arts, dance, music and writing, and never misses an opportunity to make a pun or a clever joke! You can also find her working through Codecademy courses, overcoming her lack of natural programming skills… Feel free to peek at her blog (link above) for a glimpse at her thoughts, ramblings and projects with which she tinkers — when not busy checking Twitter too much or creating way too many Tumblr blogs.",
		"typeId": "linkedin",
		"url": "https://www.linkedin.com/in/kiakokalitcheva",
		"typeName": "LinkedIn",
		"type": "linkedin",
		"id": "80846178"
	}, {
		"username": "imkialikethecar",
		"bio": "Hello. I'm Kia (like the car) and this is my Twitter. I'm a #Cal alumna (Go Bears!), #SiliconValley girl, and have too many interests to list them!",
		"typeId": "twitter",
		"url": "https://twitter.com/imkialikethecar",
		"typeName": "Twitter",
		"type": "twitter",
		"id": "245697392"
	}],
	"demographics": {
		"locationDeduced": {
			"city": {
				"name": "San Francisco"
			},
			"country": {
				"code": "US",
				"name": "United States",
				"deduced": false
			},
			"deducedLocation": "San Francisco, California, United States",
			"state": {
				"code": "CA",
				"name": "California"
			},
			"normalizedLocation": "San Francisco, California, United States",
			"likelihood": 1,
			"continent": {
				"name": "North America",
				"deduced": true
			}
		},
		"gender": "Female",
		"locationGeneral": "San Francisco, California, United States"
	},
	"photos": [{
		"url": "https://d2ojpxxtu63wzl.cloudfront.net/static/db025b8d16418f3c9b3fd404c977516b_f68c6854cd31a15acd3907c921bb68eed776d61459005d6af7a5c7d71da841e2",
		"typeId": "linkedin",
		"isPrimary": true,
		"type": "linkedin",
		"typeName": "LinkedIn"
	}, {
		"url": "https://d2ojpxxtu63wzl.cloudfront.net/static/fe4211d62b93d5625e74f102b03dd8a8_a34e7464f1ec64ebc325f46252455bc52c4361be1c2dfc1d82062334710440af",
		"typeId": "gravatar",
		"type": "gravatar",
		"typeName": "Gravatar"
	}, {
		"url": "https://d2ojpxxtu63wzl.cloudfront.net/static/b866f84561e265810e7d99e985e66f7c_14e510322202aee118a90b25b47323f694b7942b065c506ca5786721ba4f01d0",
		"typeId": "twitter",
		"type": "twitter",
		"typeName": "Twitter"
	}, {
		"url": "https://d2ojpxxtu63wzl.cloudfront.net/static/274b4d5a7c404c43d3e0ba5fb16502ad_9700139019e26fc2b500f3a354d8760a549c129facfd47d1177d6a7f93ddbdc3",
		"typeId": "google",
		"type": "google",
		"typeName": "GooglePlus"
	}],
	"requestId": "5e7731a6-173b-4893-98c2-c1e8197628c4",
	"contactInfo": {
		"givenName": "Kia",
		"fullName": "Kia Kokalitcheva",
		"familyName": "Kokalitcheva",
		"websites": [{
			"url": "http://fortune.com/author/kia-kokalitcheva"
		}]
	},
	"writingInformation": {
		"beats": ["Technology"],
		"occasionalBeats": [],
		"isFreelancer": false,
		"isInfluencer": false,
		"rss": null
	}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant