Page MenuHomePhabricator

Create a public REST endpoint for Announcements API
Closed, ResolvedPublic

Description

For the new endpoint we are creating as part of the MCS: T145830

Route: /feed/announcements

Response:

"announce": [
  {
    id: "EN1216CAMPAIGN",
    startTime: "2016-12-01T17:11:12Z",
    endTime: "2016-12-06T17:11:12Z",
    type: "fundraising",
    platforms: [
        "iOS",
         "Android"
    ],
    text: "Please help Wikipedia by making a donation!",
    image: "https://image.url"
    action: {
        text: "Donate"
        url: "https://fundraising.url?campaign_id=12345&source=app"
    },
    countries: [
        "US",
        "CA"
    ]
  },

  {
    id: "EN1216SURVEY",
    startTime: "2016-11-01T17:11:12Z",
    endTime: "2016-11-06T17:11:12Z",
    type: "survey",
    platforms: [
         "Android"
    ],
    text: "Would you like to take a brief survey?",
    action: {
        text: "Go",
        url: "https://survey.url?survey_id=12345&source=android"
    },
    countries: [
        "US",
        "CA",
        "GB"
    ]
  },

  ...
]