Package blue.starry.penicillin.endpoints.collections.entries

Functions

Link copied to clipboard
fun CollectionEntries.add(    id: String,     tweetId: Long,     relativeTo: Long? = null,     above: Boolean? = null,     vararg options: Option): JsonObjectApiAction<Collection.Entry.Result>

Add a specified Tweet to a Collection. A collection will store up to a few thousand Tweets. Adding a Tweet to a collection beyond its allowed capacity will remove the oldest Tweet in the collection based on the time it was added to the collection. Use POST collections/entries/curate to add Tweets to a Collection in bulk.

Link copied to clipboard
fun CollectionEntries.curate(payload: JsonObject, vararg options: Option): JsonObjectApiAction<Collection.Entry.Result>

Curate a Collection by adding or removing Tweets in bulk. Updates must be limited to 100 cumulative additions or removals per request. Use POST collections/entries/add and POST collections/entries/remove to add or remove a single Tweet.

Link copied to clipboard
fun CollectionEntries.entries(    id: String,     count: Int? = null,     maxPosition: Int? = null,     minPosition: Int? = null,     vararg options: Option): JsonObjectApiAction<Collection.Entry.Result>

Retrieve the identified Collection, presented as a list of the Tweets curated within. The response structure of this method differs significantly from timelines you may be used to working with elsewhere in the Twitter API. To navigate a Collection, use the position object of a response, which includes attributes for max_position, min_position, and was_truncated. was_truncated indicates whether additional Tweets exist in the collection outside of the range of the current request. To retrieve Tweets further back in time, use the value of min_position found in the current response as the max_position parameter in the next call to this endpoint.

Link copied to clipboard
fun CollectionEntries.move(    id: String,     tweetId: Long,     relativeTo: Long,     above: Boolean? = null,     vararg options: Option): JsonObjectApiAction<Collection.Entry.Result>

Move a specified Tweet to a new position in a curation_reverse_chron ordered collection.

Link copied to clipboard
fun CollectionEntries.remove(    id: String,     tweetId: Long,     vararg options: Option): JsonObjectApiAction<Collection.Entry.Result>

Remove the specified Tweet from a Collection. Use POST collections/entries/curate to remove Tweets from a Collection in bulk.