edit

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 24, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package edit implements editing operations on tweets and tweet metadata.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Query

type Query struct {
	*jhttp.Request
	// contains filtered or unexported fields
}

A Query is a query to modify the contents or properties of tweets.

func Block

func Block(userID, blockeeID string) Query

Block constructs a query for one user ID to block another user ID.

API: POST 2/users/:id/blocking

func Bookmark

func Bookmark(userID, tweetID string) Query

Bookmark constructs a query for the given user ID to bookmark the given tweet ID.

API: 2/users/:id/bookmarks

func DeleteTweet

func DeleteTweet(tweetID string) Query

DeleteTweet constructs a query to delete the given tweet ID.

API: DELETE 2/tweets/:tid

func Follow

func Follow(userID, followeeID string) Query

Follow constructs a query for one user ID to follow another user ID.

API: POST 2/users/:id/following

func Like

func Like(userID, tweetID string) Query

Like constructs a query for the given user ID to like the given tweet ID.

API: POST 2/users/:id/likes

func Mute

func Mute(userID, muteeID string) Query

Mute constructs a query for one user ID to mute another user ID.

API: POST 2/users/:id/muting

func PinList

func PinList(userID, listID string) Query

PinList constructs a query for one user ID to pin a list ID.

API: POST 2/users/:id/pinned_lists

func Retweet

func Retweet(userID, tweetID string) Query

Retweet constructs a query for the given user ID to retweet the given tweet ID.

API: POST 2/users/:id/retweets

func SetRepliesHidden

func SetRepliesHidden(tweetID string, hidden bool) Query

SetRepliesHidden constructs a query to set whether replies to the given tweet ID should (hidden == true) or should not (hidden == false) be hidden.

API: PUT 2/tweets/:id/hidden

func Unblock

func Unblock(userID, blockeeID string) Query

Unblock constructs a query for one user ID to un-block another user ID.

API: DELETE 2/users/:id/blocking/:other

func Unbookmark

func Unbookmark(userID, tweetID string) Query

Unbookmark constructs a query for the given user ID to un-like the given tweet ID.

API: DELETE 2/users/:id/bookmarks/:tid

func Unfollow

func Unfollow(userID, followeeID string) Query

Unfollow constructs a query for one user ID to un-follow another user ID.

API: DELETE 2/users/:id/following/:other

func Unlike

func Unlike(userID, tweetID string) Query

Unlike constructs a query for the given user ID to un-like the given tweet ID.

API: DELETE 2/users/:id/likes/:tid

func Unmute

func Unmute(userID, muteeID string) Query

Unmute constructs a query for one user ID to un-mute another user ID.

API: DELETE 2/users/:id/muting/:other

func UnpinLists

func UnpinLists(userID, listID string) Query

UnpinList constructs a query for one user ID to un-pin a list ID.

API: DELETE 2/users/:id/pinned_lists/:lid

func Unretweet

func Unretweet(userID, tweetID string) Query

Unretweet constructs a query for the given user ID to un-retweet the given tweet ID.

API: DELETE 2/users/:id/retweets/:tid

func (Query) Invoke

func (e Query) Invoke(ctx context.Context, cli *twitter.Client) (bool, error)

Invoke executes the query on the given context and client. A successful response reports whether the edit took effect.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL