Skip to content

Instantly share code, notes, and snippets.

@spra85
Last active February 6, 2017 09:31
Show Gist options
  • Save spra85/f5901c7bb1bca4e4d7df55a08d8495f4 to your computer and use it in GitHub Desktop.
Save spra85/f5901c7bb1bca4e4d7df55a08d8495f4 to your computer and use it in GitHub Desktop.
Example of super features JSON

Examples:

American Voters CMS

Schema

{
  "fields": {
    "id": {
      "read_only": true,
      "required": false,
      "type": "integer",
      "label": "ID"
    },
    "polymorphic_ctype": {
      "read_only": true,
      "required": false,
      "type": "field"
    },
    "tags": {
      "read_only": false,
      "required": false,
      "type": "field"
    },
    "feature_type": {
      "read_only": false,
      "required": false,
      "type": "field"
    },
    "authors": {
      "read_only": false,
      "required": false,
      "type": "string"
    },
    "thumbnail": {
      "read_only": true,
      "required": false,
      "type": "image"
    },
    "first_image": {
      "read_only": true,
      "required": false,
      "type": "image"
    },
    "thumbnail_override": {
      "read_only": false,
      "required": false,
      "type": "image"
    },
    "absolute_url": {
      "read_only": true,
      "required": false,
      "type": "field"
    },
    "status": {
      "read_only": true,
      "required": false,
      "type": "field"
    },
    "template_type": {
      "read_only": false,
      "required": false,
      "type": "field"
    },
    "recirc_query": {
      "read_only": false,
      "required": false,
      "type": "field"
    },
    "data": {
      "fields": {
        "intro_copy": {
          "read_only": false,
          "field_size": "long",
          "required": false,
          "type": "richtext"
        },
        "header_videos": {
          "type": "array",
          "fields": {
            "video": {
              "read_only": false,
              "required": false,
              "type": "string",
              "label": "Video"
            }
          }
        },
        "header_images": {
          "type": "array",
          "fields": {
            "image": {
              "read_only": false,
              "required": false,
              "type": "image",
              "label": "Image"
            }
          }
        },
        "voter_voices_title": {
          "read_only": false,
          "required": false,
          "type": "string"
        },
        "voter_voices_intro": {
          "read_only": false,
          "required": false,
          "type": "string"
        },
        "footer_url": {
          "read_only": false,
          "required": false,
          "type": "string"
        },
        "footer_copy": {
          "read_only": false,
          "required": false,
          "type": "string"
        }
      }
    },
    "ordering": {
      "read_only": false,
      "required": false,
      "type": "integer"
    },
    "parent": {
      "read_only": false,
      "required": false,
      "type": "field"
    },
    "image": {
      "read_only": false,
      "required": false,
      "type": "image"
    },
    "children_count": {
      "read_only": true,
      "required": false,
      "type": "field"
    },
    "child_types": {
      "read_only": true,
      "required": false,
      "type": "field"
    },
    "published": {
      "read_only": false,
      "required": false,
      "type": "datetime"
    },
    "last_modified": {
      "read_only": true,
      "required": false,
      "type": "datetime"
    },
    "title": {
      "read_only": false,
      "max_length": 512,
      "type": "string",
      "required": true
    },
    "slug": {
      "read_only": false,
      "max_length": 50,
      "type": "slug",
      "required": false
    },
    "description": {
      "read_only": false,
      "required": false,
      "type": "string"
    },
    "subhead": {
      "read_only": false,
      "max_length": 255,
      "type": "string",
      "required": false
    },
    "indexed": {
      "read_only": false,
      "required": false,
      "type": "boolean"
    },
    "evergreen": {
      "read_only": false,
      "required": false,
      "type": "boolean"
    },
    "instant_article": {
      "read_only": false,
      "required": false,
      "type": "boolean"
    },
    "tunic_campaign_id": {
      "read_only": false,
      "max_value": 2147483647,
      "min_value": -2147483648,
      "type": "integer",
      "required": false
    },
    "template_choice": {
      "read_only": false,
      "required": false,
      "type": "choice",
      "choices": [
        {
          "display_name": null,
          "value": 0
        }
      ]
    },
    "instant_article_id": {
      "read_only": false,
      "max_value": 9223372036854775807,
      "min_value": -9223372036854775808,
      "type": "integer",
      "required": false
    },
    "hide_from_rss": {
      "read_only": false,
      "required": false,
      "type": "boolean"
    },
    "end_date": {
      "read_only": false,
      "required": false,
      "type": "datetime"
    },
    "notes": {
      "read_only": false,
      "required": false,
      "type": "string"
    },
    "internal_name": {
      "read_only": false,
      "max_length": 255,
      "type": "string",
      "required": false
    },
    "superfeature_type": {
      "read_only": false,
      "required": true,
      "type": "choice",
      "choices": [
        {
          "display_name": "Bracket Racket",
          "value": "BRACKET_RACKET"
        },
        {
          "display_name": "Guide To Homepage",
          "value": "GUIDE_TO_HOMEPAGE"
        },
        {
          "display_name": "Guide To Entry",
          "value": "GUIDE_TO_ENTRY"
        },
        {
          "display_name": "To Watch Homepage",
          "value": "TO_WATCH_HOMEPAGE"
        },
        {
          "display_name": "To Watch Entry",
          "value": "TO_WATCH_ENTRY"
        },
        {
          "display_name": "State by State Landing",
          "value": "STATE_BY_STATE_LANDING"
        },
        {
          "display_name": "State by State Entry",
          "value": "STATE_BY_STATE_DETAIL"
        },
        {
          "display_name": "American Voters Landing",
          "value": "AMERICAN_VOTERS_LANDING"
        },
        {
          "display_name": "American Voters Detail",
          "value": "AMERICAN_VOTERS_DETAIL"
        },
        {
          "display_name": "Our Annual Year Landing",
          "value": "OUR_ANNUAL_YEAR"
        },
        {
          "display_name": "Our Annual Year Category",
          "value": "OUR_ANNUAL_YEAR_CATEGORY"
        },
        {
          "display_name": "Our Annual Year Month",
          "value": "OUR_ANNUAL_YEAR_MONTH"
        },
        {
          "display_name": "Our Annual Year New",
          "value": "OUR_ANNUAL_YEAR_NEW"
        },
        {
          "display_name": "Presidential Retrospective Landing",
          "value": "PRESIDENTAL_RETROSPECTIVE_LANDING"
        },
        {
          "display_name": "Presidential Retrospective Detail",
          "value": "PRESIDENTAL_RETROSPECTIVE_DETAIL"
        },
        {
          "display_name": "The Super Bowl",
          "value": "THE_SUPER_BOWL"
        }
      ]
    },
    "default_child_type": {
      "read_only": false,
      "required": false,
      "type": "choice",
      "choices": [
        {
          "display_name": "Bracket Racket",
          "value": "BRACKET_RACKET"
        },
        {
          "display_name": "Guide To Homepage",
          "value": "GUIDE_TO_HOMEPAGE"
        },
        {
          "display_name": "Guide To Entry",
          "value": "GUIDE_TO_ENTRY"
        },
        {
          "display_name": "To Watch Homepage",
          "value": "TO_WATCH_HOMEPAGE"
        },
        {
          "display_name": "To Watch Entry",
          "value": "TO_WATCH_ENTRY"
        },
        {
          "display_name": "State by State Landing",
          "value": "STATE_BY_STATE_LANDING"
        },
        {
          "display_name": "State by State Entry",
          "value": "STATE_BY_STATE_DETAIL"
        },
        {
          "display_name": "American Voters Landing",
          "value": "AMERICAN_VOTERS_LANDING"
        },
        {
          "display_name": "American Voters Detail",
          "value": "AMERICAN_VOTERS_DETAIL"
        },
        {
          "display_name": "Our Annual Year Landing",
          "value": "OUR_ANNUAL_YEAR"
        },
        {
          "display_name": "Our Annual Year Category",
          "value": "OUR_ANNUAL_YEAR_CATEGORY"
        },
        {
          "display_name": "Our Annual Year Month",
          "value": "OUR_ANNUAL_YEAR_MONTH"
        },
        {
          "display_name": "Our Annual Year New",
          "value": "OUR_ANNUAL_YEAR_NEW"
        },
        {
          "display_name": "Presidential Retrospective Landing",
          "value": "PRESIDENTAL_RETROSPECTIVE_LANDING"
        },
        {
          "display_name": "Presidential Retrospective Detail",
          "value": "PRESIDENTAL_RETROSPECTIVE_DETAIL"
        },
        {
          "display_name": "The Super Bowl",
          "value": "THE_SUPER_BOWL"
        }
      ]
    },
    "body": {
      "read_only": false,
      "required": false,
      "type": "string"
    },
    "_image_caption": {
      "read_only": true,
      "required": false,
      "type": "string"
    },
    "_image_alt": {
      "read_only": true,
      "required": false,
      "type": "string"
    },
    "issue": {
      "read_only": false,
      "required": false,
      "type": "field"
    },
    "campaign": {
      "read_only": false,
      "required": false,
      "type": "field"
    }
  }
}

w/ Values

{
  "id": 54176,
  "polymorphic_ctype": "onion_superfeatures_superfeature",
  "tags": [],
  "feature_type": "Interactive Feature",
  "authors": [],
  "thumbnail": null,
  "first_image": null,
  "thumbnail_override": null,
  "absolute_url": "/interactive/american-voter",
  "status": "Published",
  "template_type": null,
  "recirc_query": {
    "included_ids": []
  },
  "data": {
    "intro_copy": "<p>Every four years, against anyone’s better judgment, the American people are entrusted to elect the next president. <i>The Onion</i> lets them tell their stories.</p>",
    "header_videos": [
      {
        "video": "4598"
      },
      {
        "video": "4599"
      },
      {
        "video": "4600"
      },
      {
        "video": "4601"
      }
    ],
    "header_images": [
      {
        "image": {
          "caption": null,
          "alt": null,
          "id": 54738
        }
      },
      {
        "image": {
          "caption": null,
          "alt": null,
          "id": 54739
        }
      },
      {
        "image": {
          "caption": null,
          "alt": null,
          "id": 54740
        }
      },
      {
        "image": {
          "caption": null,
          "alt": null,
          "id": 54741
        }
      },
      {
        "image": {
          "caption": null,
          "alt": null,
          "id": 54742
        }
      },
      {
        "image": {
          "caption": null,
          "alt": null,
          "id": 54801
        }
      },
      {
        "image": {
          "caption": null,
          "alt": null,
          "id": 54802
        }
      },
      {
        "image": {
          "caption": null,
          "alt": null,
          "id": 54803
        }
      },
      {
        "image": {
          "caption": null,
          "alt": null,
          "id": 54804
        }
      }
    ],
    "voter_voices_title": "Voter Voices",
    "voter_voices_intro": "<em>The Onion</em> asks ordinary citizens to share their thoughts, concerns, and staggering ignorance about the 2016 election.",
    "footer_url": "http://www.theonion.com/election-2016",
    "footer_copy": "See All Election Coverage"
  },
  "ordering": null,
  "parent": null,
  "image": null,
  "children_count": 14,
  "child_types": [
    "AMERICAN_VOTERS_DETAIL"
  ],
  "published": "2016-10-26T05:17:00Z",
  "last_modified": "2016-12-19T21:32:03.525813Z",
  "title": "The American Voter",
  "slug": "american-voter",
  "description": "",
  "subhead": "",
  "indexed": true,
  "evergreen": false,
  "instant_article": false,
  "tunic_campaign_id": null,
  "template_choice": 0,
  "instant_article_id": null,
  "hide_from_rss": false,
  "end_date": null,
  "notes": "",
  "internal_name": null,
  "superfeature_type": "AMERICAN_VOTERS_LANDING",
  "default_child_type": "AMERICAN_VOTERS_DETAIL",
  "body": "",
  "_image_caption": null,
  "_image_alt": null,
  "issue": 5242,
  "campaign": null
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment