Documentation ¶
Index ¶
- type AccessTokenResponse
- type GetAccountResponse
- type MastodonCrossPost
- type MediaAttachment
- type OauthRequest
- type PostMediaRequest
- type PostMediaResponse
- type PostTweetData
- type PostTweetReplyRequest
- type PostTweetRequest
- type PostTweetResponse
- type Toot
- type TweetMediaRequest
- type TwitterOAuthTokenRequest
- type TwitterOAuthTokenResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessTokenResponse ¶
type GetAccountResponse ¶
type GetAccountResponse struct {
ID string `json:"id"`
}
type MastodonCrossPost ¶
type MastodonCrossPost struct {
// contains filtered or unexported fields
}
func NewMastodonCrossPost ¶
func NewMastodonCrossPost(mastodonURL, accountID, redirectURI, clientID, clientSecret, consumerKey, consumerSecret, accessToken, accessTokenSecret, twitterAuthorizeUrl, twitterOAuth2TokenUrl, twitterPostTweetUrl, twitterMediaUploadUrl string) *MastodonCrossPost
NewMastodonCrossPost creates a new MastodonCrossPost.
Example:
mastodonCrossPost := NewMastodonCrossPost( "https://mastodon.social", "123456789", // Mastodon account ID "https://example.com/callback", "123456789", // Twitter OAuth 2 client ID "123456789", // Twitter OAuth 2 client secret "https://api.twitter.com/oauth2/authorize", "https://api.twitter.com/oauth2/token", "https://api.twitter.com/1.1/statuses/update.json", ) mastodonCrossPost.CrossPostTweets()
func (*MastodonCrossPost) CrossPostTweets ¶
func (m *MastodonCrossPost) CrossPostTweets()
type MediaAttachment ¶
type OauthRequest ¶
type PostMediaRequest ¶
type PostMediaRequest struct {
MediaData string `json:"media_data"`
}
type PostMediaResponse ¶
type PostMediaResponse struct {
MediaIDString string `json:"media_id_string"`
}
type PostTweetData ¶
type PostTweetReplyRequest ¶
type PostTweetReplyRequest struct {
InReplyToTweetID string `json:"in_reply_to_tweet_id,omitempty"`
}
type PostTweetRequest ¶
type PostTweetRequest struct { Text string `json:"text"` Reply *PostTweetReplyRequest `json:"reply,omitempty"` Media *TweetMediaRequest `json:"media,omitempty"` }
type PostTweetResponse ¶
type PostTweetResponse struct {
Data PostTweetData
}
type Toot ¶
type Toot struct { ID string `json:"id"` InReplyToID string `json:"in_reply_to_id"` InReplyToAccountID string `json:"in_reply_to_account_id"` Content string `json:"content"` CreatedAt time.Time `json:"created_at"` Reblog interface{} `json:"reblog"` MediaAttachments []MediaAttachment `json:"media_attachments"` }
type TweetMediaRequest ¶
type TweetMediaRequest struct {
MediaIDs []string `json:"media_ids,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.