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

Expose homepage data on the API #739

Merged
merged 2 commits into from
Sep 11, 2017

Conversation

gideonthomas
Copy link
Contributor

@gideonthomas gideonthomas commented Sep 8, 2017

Fixes #658.

The data returned by /api/homepage looks like:

{
  "leaders": [{
    "name": <string>,
    "role": <string>,
    "location": <string>,
    "image": <string url>,
    "links": {
      "twitter": <string url>,
      "interview": <string url>,
      "linkedIn": <string url>
    },
    "featured": <boolean>, // ignore this for now, will remove later
    "bio": <string>,
    "quote": <string>,
    "affiliations": <array of strings>,
    "internet_health_issues": <array of strings>,
    "partnership_logo": <string url>
  }, ...usually two more],
  
  "news": [{
    "headline": <string>,
    "outlet": <string>,
    "date": "yyyy-mm-dd",
    "link": <string url>,
    "excerpt": <string>,
    "author": <string>,
    "glyph": <string url>,
    "thumbnail": <string url>,
    "is_video": <boolean>, // should be true for the first element
    "featured": <boolean>
  }, ...usually three more],
  
  "highlights": [{
    "id": <integer>,
    "title": <string>,
    "description": <string>,
    "link_url": <string url>,
    "link_label": <string>,
    "image": <string url>,
    "footer": <string>
  }, ...usually two more]
}

@gvn, does the above payload look ok or do you need more data?

@gideonthomas gideonthomas requested review from gvn and alanmoo September 8, 2017 18:36
@gvn
Copy link
Contributor

gvn commented Sep 11, 2017

As long as these are just curated aggregates of the existing models then it should be good!

@gideonthomas gideonthomas merged commit d7a85f4 into MozillaFoundation:master Sep 11, 2017
gvn pushed a commit that referenced this pull request Sep 18, 2017
gvn pushed a commit that referenced this pull request Sep 18, 2017
gvn added a commit that referenced this pull request Sep 18, 2017
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

Successfully merging this pull request may close these issues.

3 participants