Instead of being redirected to the White House website to view the response, developers should be able to present the response in their applications.
Below is how the "response" object should be formatted to facilitate custom presentation of White House responses to petitions.
"response": {
"id": "681",
"author": "Bruce Reed",
"authorBio": "Bruce Reed is Chief of Staff to Vice President Biden",
"body": "In the days since the tragedy in Newtown, Americans from all over the country have called for action to deter mass shootings and reduce gun violence. Hundreds of thousands of you have signed petitions on the White House's We the People petitions platform....[shortened to be concise]",
"videoUrl": "http://www.youtube.com/watch?feature=player_embedded&v=u5ynVMBxOus",
"url": "https://petitions.whitehouse.gov/response/message-president-obama-about-your-petition-reducing-gun-violence",
"applicablePetitions": ["681", "682", "683"],
"associationTime": "1355963976"
}
Description of key JSON values:
-author: author of the response
-authorBio: brief description of the author
-body: the body of the response.
-videoUrl: url of the video response, if there is one. If there is no video response, this value could be null.
-url: url of the White House response hosted on WhiteHouse.gov in case developers wish to defer to the White House's presentation.
applicablePetitions: an array of petition id's which reference the petitions for which this response is applicable.
If it is decided that it doesn't make sense to store all of these values as part of the petition response, then developers should be able to make a request for this response resource that provides the key information listed above.
The JSON representing a petition needs to have a "response" object that decouples presentation from the White House website.
Presently, developers have no choice but to forward their users to the White House website in order to view this response.
"response": { "id": "681", "url": "https://petitions.whitehouse.gov/response/message-president-obama-about-your-petition-reducing-gun-violence", "associationTime": "1355963976" }
So in this case users would have to browse to https://petitions.whitehouse.gov/response/message-president-obama-about-your-petition-reducing-gun-violence to view the response.
Instead of being redirected to the White House website to view the response, developers should be able to present the response in their applications.
Below is how the "response" object should be formatted to facilitate custom presentation of White House responses to petitions.
"response": { "id": "681", "author": "Bruce Reed", "authorBio": "Bruce Reed is Chief of Staff to Vice President Biden", "body": "In the days since the tragedy in Newtown, Americans from all over the country have called for action to deter mass shootings and reduce gun violence. Hundreds of thousands of you have signed petitions on the White House's We the People petitions platform....[shortened to be concise]", "videoUrl": "http://www.youtube.com/watch?feature=player_embedded&v=u5ynVMBxOus", "url": "https://petitions.whitehouse.gov/response/message-president-obama-about-your-petition-reducing-gun-violence", "applicablePetitions": ["681", "682", "683"], "associationTime": "1355963976" }
Description of key JSON values: -author: author of the response -authorBio: brief description of the author -body: the body of the response. -videoUrl: url of the video response, if there is one. If there is no video response, this value could be null. -url: url of the White House response hosted on WhiteHouse.gov in case developers wish to defer to the White House's presentation. applicablePetitions: an array of petition id's which reference the petitions for which this response is applicable.
If it is decided that it doesn't make sense to store all of these values as part of the petition response, then developers should be able to make a request for this response resource that provides the key information listed above.