-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Modifying "posts" fixture to match the new API data structure
closes #2415 - data now match the new Posts API data structure - has enough entries to allow for scrolling - also including the generator template (as a txt file) used in json-generator.com
- Loading branch information
Showing
2 changed files
with
4,788 additions
and
211 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,131 @@ | ||
Fixtures for the Ghost blogging platform, intended to be generated with http://www.json-generator.com/ | ||
|
||
{ | ||
posts: [ | ||
'{{repeat(30)}}', | ||
{ | ||
id: '{{index()}}', | ||
uuid: '{{guid()}}', | ||
status: '{{random("published ", "draft")}}', | ||
title: '{{lorem( integer(1, 10), "words")}}', | ||
slug: function(tag, index){ | ||
return this.title.replace(/ /g, '-'); | ||
}, | ||
markdown: '{{lorem( integer(1, 10), "paragraphs")}}', | ||
html: function(tag, index){ | ||
return "<p>" + this.markdown + "</p>"; | ||
}, | ||
image: null, | ||
featured: '{{integer(0, 1)}}', | ||
page: '{{integer(0, 10)}}', | ||
language: "en_US", | ||
meta_title: null, | ||
meta_description: null, | ||
author: { | ||
id: '{{integer(0, 10)}}', | ||
uuid: '{{guid()}}', | ||
name: '{{firstName()}} {{surname()}}', | ||
slug: function(tag, index){ | ||
return this.name.replace(/ /g, '-').toLocaleLowerCase(); | ||
}, | ||
email: '{{email()}}', | ||
image: undefined, | ||
cover: undefined, | ||
bio: '{{lorem(5, 50, "words")}}', | ||
website: "", | ||
location: '{{lorem( integer(1, 3), "words")}}', | ||
accessibility: undefined, | ||
status: "active", | ||
language: "en_US", | ||
meta_title: undefined, | ||
meta_description: undefined, | ||
created_at: '{{date(new Date(2012, 0, 1), new Date(), "YYYY-MM-ddThh:mm:ss.ff Z")}}', | ||
updated_at: '{{date(new Date(2012, 0, 1), new Date(), "YYYY-MM-ddThh:mm:ss.ff Z")}}' | ||
}, | ||
created_at: '{{date(new Date(2012, 0, 1), new Date(), "YYYY-MM-ddThh:mm:ss.ff Z")}}', | ||
created_by: { | ||
id: '{{integer(0, 10)}}', | ||
uuid: '{{guid()}}', | ||
name: '{{firstName()}} {{surname()}}', | ||
slug: function(tag, index){ | ||
return this.name.replace(/ /g, '-').toLocaleLowerCase(); | ||
}, | ||
email: '{{email()}}', | ||
image: undefined, | ||
cover: undefined, | ||
bio: '{{lorem(5, 50, "words")}}', | ||
website: "", | ||
location: '{{lorem( integer(1, 3), "words")}}', | ||
accessibility: undefined, | ||
status: "active", | ||
language: "en_US", | ||
meta_title: undefined, | ||
meta_description: undefined, | ||
created_at: '{{date(new Date(2012, 0, 1), new Date(), "YYYY-MM-ddThh:mm:ss.ff Z")}}', | ||
updated_at: '{{date(new Date(2012, 0, 1), new Date(), "YYYY-MM-ddThh:mm:ss.ff Z")}}' | ||
}, | ||
updated_at: '{{date(new Date(2012, 0, 1), new Date(), "YYYY-MM-ddThh:mm:ss.ff Z")}}', | ||
updated_by: { | ||
id: '{{integer(0, 10)}}', | ||
uuid: '{{guid()}}', | ||
name: '{{firstName()}} {{surname()}}', | ||
slug: function(tag, index){ | ||
return this.name.replace(/ /g, '-').toLocaleLowerCase(); | ||
}, | ||
email: '{{email()}}', | ||
image: undefined, | ||
cover: undefined, | ||
bio: '{{lorem(5, 50, "words")}}', | ||
website: "", | ||
location: '{{lorem( integer(1, 3), "words")}}', | ||
accessibility: undefined, | ||
status: "active", | ||
language: "en_US", | ||
meta_title: undefined, | ||
meta_description: undefined, | ||
created_at: '{{date(new Date(2012, 0, 1), new Date(), "YYYY-MM-ddThh:mm:ss.ff Z")}}', | ||
updated_at: '{{date(new Date(2012, 0, 1), new Date(), "YYYY-MM-ddThh:mm:ss.ff Z")}}' | ||
}, | ||
published_at: '{{date(new Date(2012, 0, 1), new Date(), "YYYY-MM-ddThh:mm:ss.ff Z")}}', | ||
published_by: { | ||
id: '{{integer(0, 10)}}', | ||
uuid: '{{guid()}}', | ||
name: '{{firstName()}} {{surname()}}', | ||
slug: function(tag, index){ | ||
return this.name.replace(/ /g, '-').toLocaleLowerCase(); | ||
}, | ||
email: '{{email()}}', | ||
image: undefined, | ||
cover: undefined, | ||
bio: '{{lorem(5, 50, "words")}}', | ||
website: "", | ||
location: '{{lorem( integer(1, 3), "words")}}', | ||
accessibility: undefined, | ||
status: "active", | ||
language: "en_US", | ||
meta_title: undefined, | ||
meta_description: undefined, | ||
created_at: '{{date(new Date(2012, 0, 1), new Date(), "YYYY-MM-ddThh:mm:ss.ff Z")}}', | ||
updated_at: '{{date(new Date(2012, 0, 1), new Date(), "YYYY-MM-ddThh:mm:ss.ff Z")}}' | ||
}, | ||
tags: [ | ||
'{{repeat(0, 10)}}', | ||
{ | ||
id: '{{integer(0, 100)}}', | ||
uuid: '{{guid()}}', | ||
name: '{{lorem( integer(1, 3), "words")}}', | ||
slug: function(tag, index){ | ||
return this.name.replace(/ /g, '-').toLocaleLowerCase(); | ||
}, | ||
description: null, | ||
parent_id: null, | ||
meta_title: null, | ||
meta_description: null, | ||
created_at: '{{date(new Date(2012, 0, 1), new Date(), "YYYY-MM-ddThh:mm:ss.ff Z")}}', | ||
created_by: '{{integer(0, 10)}}', | ||
updated_at: '{{date(new Date(2012, 0, 1), new Date(), "YYYY-MM-ddThh:mm:ss.ff Z")}}', | ||
updated_by: '{{integer(0, 10)}}' | ||
} | ||
] | ||
}] | ||
} |
Oops, something went wrong.