Skip to content

Instantly share code, notes, and snippets.

@buren buren/articles.js
Created Oct 9, 2017

Embed
What would you like to do?
const articles = {
data: [{
id: 3,
type: 'articles'
attributes: {
title: 'LMA-kort',
slug: 'lma-kort',
body_html: '<p>LMA-kort är ett bevis på...</p>',
language_id: 192,
traits: ['bank_account', 'skill_ids', 'resume', 'personal_letter'], // zero to many
translated_text: {
title: 'LMA-card',
slug: 'lma-card',
body_html: '<p>LMA-card is proof of...</p>',
language_id: 37
}
},
relationships: {
previous_article: {
data: {
id: 1,
type: 'articles'
}
},
next_article: {
data: {
id: 2,
type: 'articles'
}
},
guide_section: {
data: {
id: 1,
type: 'guide_section'
}
}
}
}]
}
const guideSections = {
data: [{
id: 1,
type: 'guide_sections',
attributes: {
order: 1,
title: 'Att jobba i Sverige',
slug: 'att-jobba-i-sverige',
short_description: 'Vad behöver du för att kunna jobba i Sverige?',
language_id: 192,
translated_text: {
title: 'Att jobba i Sverige',
slug: 'att-jobba-i-sverige',
short_description: 'Vad behöver du för att kunna jobba i Sverige?',
language_id: 192
}
},
relationships: {
articles: [{
data: {
id: 1,
type: 'articles'
}
},
{
data: {
id: 3,
type: 'articles'
}
}]
}
}]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.