Skip to content
This repository was archived by the owner on Nov 11, 2018. It is now read-only.
This repository was archived by the owner on Nov 11, 2018. It is now read-only.

Come up with universal schema #127

@christianbundy

Description

@christianbundy

Hacker News has the post schema:

{
  "id": 7707100,
  "created_at": "2014-05-06T21:08:50.000Z",
  "created_at_i": 1399410530,
  "type": "story",
  "author": "coffeecodecouch",
  "title": "Show HN: Hipster Domain Finder",
  "url": "http://www.hipsterdomainfinder.com/",
  "text": "",
  "points": 162,
  "children": []
}

and the comment schema:

{
  "id": 7707666,
  "created_at": "2014-05-06T22:59:33.000Z",
  "created_at_i": 1399417173,
  "type": "comment",
  "author": "hftf",
  "text": "\u003Cp\u003EHere is a version of the list grouped by whether the TLD is the same as the last hyphenation point (e.g., \u003Ci\u003Ecrow.bar\u003C/i\u003E and not \u003Ci\u003Efrig.ht\u003C/i\u003E).\u003C/p\u003E\u003Cp\u003E\u003Ca href=\"http://pastie.org/pastes/9147186/text\" rel=\"nofollow\"\u003Ehttp:\u0026#x2F;\u0026#x2F;pastie.org\u0026#x2F;pastes\u0026#x2F;9147186\u0026#x2F;text\u003C/a\u003E\u003C/p\u003E",
  "points": 1,
  "parent_id": 7707100,
  "story_id": 7707100,
  "children": []
}

Designer News has the schema:

{
  "id": 22383,
  "title": "VSCO raises $40 million in funding",
  "comment": "",
  "comment_html": null,
  "comment_count": 21,
  "vote_count": 37,
  "created_at": "2014-05-06T13:13:08Z",
  "pinned_at": null,
  "url": "https://news.layervault.com/click/stories/22383",
  "site_url": "https://api-news.layervault.com/stories/22383-vsco-raises-40-million-in-funding",
  "user_id": 69,
  "user_display_name": "David M.",
  "user_portrait_url": "https://designer-news.s3.amazonaws.com/rendered_portraits/69/original/portrait-2013-10-29_22_09_24__0000-6920131029-5430-7eeq14.png?AWSAccessKeyId=AKIAI4OKHYH7JRMFZMUA&Expires=1430977741&Signature=yAYN0R54jV1xdHo2QVOF2BqdsHM%3D",
  "hostname": "bits.blogs.nytimes.com",
  "user_url": "http://news.layervault.com/u/69/david-mckinney",
  "badge": null,
  "user_job": "beginner designer & developer",
  "comments": []
}

And the comment schema:

{
  "id": 62051,
  "body": "Wow. That is a massive round. I really didn't see this coming.  ",
  "body_html": "<p>Wow. That is a massive round. I really didn&#39;t see this coming.  </p>\n",
  "created_at": "2014-05-06T13:15:08Z",
  "depth": 0,
  "vote_count": 1,
  "url": "https://api-news.layervault.com/comments/62051",
  "user_url": "http://news.layervault.com/u/69/david-mckinney",
  "user_id": 69,
  "user_display_name": "David M.",
  "user_portrait_url": "https://designer-news.s3.amazonaws.com/rendered_portraits/69/original/portrait-2013-10-29_22_09_24__0000-6920131029-5430-7eeq14.png?AWSAccessKeyId=AKIAI4OKHYH7JRMFZMUA&Expires=1430977741&Signature=yAYN0R54jV1xdHo2QVOF2BqdsHM%3D",
  "user_job": "beginner designer & developer",
  "comments": []
}

so it looks like we need

post:

id
created at
type (story/poll)
author
title
link url
text
points
comments
comment num
comment url
author url
author job


comment:
id
created at
author
text
points
parent id
ancestor id
comments

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions