Share a Post (specified with post_id) with your followers. Reposts are intended solely as a routing mechanism; a repost’s text, entities, and html are “inherited” from the original Post. If a user would like to quote, comment on, or alter a Post, reposts are not the solution. Reposts are meant to be pointers to another Post.
For compatibility with clients who don’t wish to show reposts specially, we set a repost’s text field to be >> @username: original text
. Thus the text field could actually be slightly longer than 256 characters. Most clients will probably want to display the original post (with some indication that is has been reposted). When rendering a repost, we recommend you pull most of your information from repost_of
and make use of the repost_of.reposters
field.
This endpoint responds to general Post parameters.
Method | URL | Token | Scope |
---|---|---|---|
POST | https://alpha-api.app.net/stream/0/posts/{post_id}/repost | User | write_post |
Name | Description |
---|---|
post_id |
The id of the Post to repost. |
curl -H "Authorization: Bearer <YOUR ACCESS TOKEN>" -H "X-ADN-Pretty-JSON: 1" \
"https://alpha-api.app.net/stream/0/posts/914440/repost"
{
"data": {
"canonical_url": "https://alpha.app.net/berg/post/914455",
"created_at": "2012-10-11T19:49:20Z",
"entities": {
"hashtags": [
{
"len": 8,
"name": "adnhack",
"pos": 90
}
],
"links": [
{
"len": 29,
"pos": 100,
"text": "http://appnet.eventbrite.com/",
"url": "http://appnet.eventbrite.com/"
}
],
"mentions": [
{
"id": "136",
"len": 4,
"name": "adn",
"pos": 3
}
]
},
"html": "<span itemscope=\"https://app.net/schemas/Post\">>> <span data-mention-id=\"136\" data-mention-name=\"adn\" itemprop=\"mention\">@adn</span>: If you're in San Francisco on Saturday October 20 and Sunday October 21 come to the first <span data-hashtag-name=\"adnhack\" itemprop=\"hashtag\">#adnhack</span>: <a href=\"http://appnet.eventbrite.com/\">http://appnet.eventbrite.com/</a></span>",
"id": "914455",
"machine_only": false,
"num_replies": 0,
"num_reposts": 0,
"num_stars": 0,
"source": {
"client_id": "caYWDBvjwt2e9HWMm6qyKS6KcATHUkzQ",
"link": "https://alpha.app.net",
"name": "Alpha"
},
"text": ">> @adn: If you're in San Francisco on Saturday October 20 and Sunday October 21 come to the first #adnhack => http://appnet.eventbrite.com/",
"thread_id": "914440",
"user": "...user object...",
"you_reposted": false,
"you_starred": false,
"repost_of": {
"canonical_url": "https://alpha.app.net/adn/post/914440",
"created_at": "2012-10-11T19:48:40Z",
"entities": {
"hashtags": [
{
"len": 8,
"name": "adnhack",
"pos": 90
}
],
"links": [
{
"len": 29,
"pos": 100,
"text": "http://appnet.eventbrite.com/",
"url": "http://appnet.eventbrite.com/"
}
],
"mentions": [
]
},
"html": "<span itemscope=\"https://app.net/schemas/Post\">If you're in San Francisco on Saturday October 20 and Sunday October 21 come to the first <span data-hashtag-name=\"adnhack\" itemprop=\"hashtag\">#adnhack</span> => <a href=\"http://appnet.eventbrite.com/\">http://appnet.eventbrite.com/</a></span>",
"id": "914440",
"machine_only": false,
"num_replies": 1,
"num_reposts": 4,
"num_stars": 3,
"source": {
"client_id": "caYWDBvjwt2e9HWMm6qyKS6KcATHUkzQ",
"link": "https://alpha.app.net",
"name": "Alpha"
},
"text": "If you're in San Francisco on Saturday October 20 and Sunday October 21 come to the first #adnhack => http://appnet.eventbrite.com/",
"thread_id": "914440",
"user": "...user object...",
"you_reposted": true,
"you_starred": false
}
},
"meta": {
"code": 200
}
}
Given the original post_id
, delete the current user’s repost. This same functionality can be accomplished by deleting using the repost’s post_id.
This endpoint responds to general Post parameters.
Method | URL | Token | Scope |
---|---|---|---|
DELETE | https://alpha-api.app.net/stream/0/posts/{post_id}/repost | User | write_post |
Name | Description |
---|---|
post_id |
The id of the Post to unrepost. |
curl -X DELETE -H "Authorization: Bearer <YOUR ACCESS TOKEN>" -H "X-ADN-Pretty-JSON: 1" \
"https://alpha-api.app.net/stream/0/posts/914440/repost"
{
"data": {
"canonical_url": "https://alpha.app.net/adn/post/914440",
"created_at": "2012-10-11T19:48:40Z",
"entities": {
"hashtags": [
{
"len": 8,
"name": "adnhack",
"pos": 90
}
],
"links": [
{
"len": 29,
"pos": 100,
"text": "http://appnet.eventbrite.com/",
"url": "http://appnet.eventbrite.com/"
}
],
"mentions": [
]
},
"html": "<span itemscope=\"https://app.net/schemas/Post\">If you're in San Francisco on Saturday October 20 and Sunday October 21 come to the first <span data-hashtag-name=\"adnhack\" itemprop=\"hashtag\">#adnhack</span> => <a href=\"http://appnet.eventbrite.com/\">http://appnet.eventbrite.com/</a></span>",
"id": "914440",
"machine_only": false,
"num_replies": 1,
"num_reposts": 3,
"num_stars": 3,
"source": {
"client_id": "caYWDBvjwt2e9HWMm6qyKS6KcATHUkzQ",
"link": "https://alpha.app.net",
"name": "Alpha"
},
"text": "If you're in San Francisco on Saturday October 20 and Sunday October 21 come to the first #adnhack => http://appnet.eventbrite.com/",
"thread_id": "914440",
"user": "...user object...",
"you_reposted": false,
"you_starred": false
},
"meta": {
"code": 200
}
}