Blocks

class Blocks(val client: ApiClient) : Endpoint

Collection of api endpoints related to blocks.

See also

Parameters

client

Current ApiClient instance.

Constructors

Link copied to clipboard
fun Blocks(client: ApiClient)

Creates new Blocks endpoint instance.

Properties

Link copied to clipboard
open override val client: ApiClient

Extensions

Link copied to clipboard
fun Blocks.createByScreenName(    screenName: String,     includeEntities: Boolean? = null,     skipStatus: Boolean? = null,     vararg options: Option): JsonObjectApiAction<User>

Blocks the specified user from following the authenticating user. In addition the blocked user will not show in the authenticating users mentions or timeline (unless retweeted by another user). If a follow or friend relationship exists it is destroyed.

Link copied to clipboard
fun Blocks.createByUserId(    userId: Long,     includeEntities: Boolean? = null,     skipStatus: Boolean? = null,     vararg options: Option): JsonObjectApiAction<User>

Blocks the specified user from following the authenticating user. In addition the blocked user will not show in the authenticating users mentions or timeline (unless retweeted by another user). If a follow or friend relationship exists it is destroyed.

Link copied to clipboard
fun Blocks.destroyByScreenName(    screenName: String,     includeEntities: Boolean? = null,     skipStatus: Boolean? = null,     vararg options: Option): JsonObjectApiAction<User>

Un-blocks the user specified in the ID parameter for the authenticating user. Returns the un-blocked user when successful. If relationships existed before the block was instantiated, they will not be restored.

Link copied to clipboard
fun Blocks.destroyByUserId(    userId: Long,     includeEntities: Boolean? = null,     skipStatus: Boolean? = null,     vararg options: Option): JsonObjectApiAction<User>

Un-blocks the user specified in the ID parameter for the authenticating user. Returns the un-blocked user when successful. If relationships existed before the block was instantiated, they will not be restored.

Link copied to clipboard
val Blocks.listIds: CursorJsonObjectApiAction<CursorIds, Long>

Shorthand extension property to Blocks.listIds.

fun Blocks.listIds(    stringifyIds: Boolean? = null,     cursor: Long? = null,     vararg options: Option): CursorJsonObjectApiAction<CursorIds, Long>

Returns an array of numeric user ids the authenticating user is blocking.

Link copied to clipboard
val Blocks.listUsers: CursorJsonObjectApiAction<CursorUsers, User>

Shorthand extension property to Blocks.listUsers.

fun Blocks.listUsers(    includeEntities: Boolean? = null,     skipStatus: Boolean? = null,     cursor: Long? = null,     vararg options: Option): CursorJsonObjectApiAction<CursorUsers, User>

Returns a collection of user objects that the authenticating user is blocking.