Documentation
¶
Index ¶
- func AddV1Path(function func(string, ...fiber.Handler) fiber.Router, url string, ...)
- func AttemptToAuthenticateWithOauth(c *fiber.Ctx) error
- func CDNDownscaler(c *fiber.Ctx) error
- func CDNVideoProxy(c *fiber.Ctx) error
- func CheckTokenType(token string) int
- func ConvertV1TokenToV2(token string) (*bridge.AuthToken, error)
- func CreateShortLink(originalPath string, prefix string) (string, error)
- func DeleteTweet(c *fiber.Ctx) error
- func DevicePushDestinations(c *fiber.Ctx) error
- func EncodeAndSend(c *fiber.Ctx, data interface{}) error
- func FollowUser(c *fiber.Ctx) error
- func GenerateNumericPIN(length int) (string, error)
- func GetAuthFromReq(c *fiber.Ctx) (*string, *string, *string, *string, error)
- func GetEncryptionKeyFromRequest(c *fiber.Ctx) (*string, error)
- func GetFollowers(c *fiber.Ctx) error
- func GetFollowersIds(c *fiber.Ctx) error
- func GetFollowingIds(c *fiber.Ctx) error
- func GetFollows(c *fiber.Ctx) error
- func GetListMembers(c *fiber.Ctx) error
- func GetLock(userDID string) *sync.Mutex
- func GetMyActivity(c *fiber.Ctx) error
- func GetSettings(c *fiber.Ctx) error
- func GetStatusFromId(c *fiber.Ctx) error
- func GetStatusesFollowers(c *fiber.Ctx) error
- func GetStatusesFollows(c *fiber.Ctx) error
- func GetSuggestedUsers(c *fiber.Ctx) error
- func GetTopicSuggestedUsers(c *fiber.Ctx) error
- func GetUserInfoFromTweetData(tweet blueskyapi.Post) bridge.TwitterUser
- func GetUserSpecifiedInRequest(c *fiber.Ctx, no_value_default *string) (*string, error)
- func GetUsersLists(c *fiber.Ctx) error
- func GetUsersRelationship(c *fiber.Ctx) error
- func HandleBlueskyError(c *fiber.Ctx, responseJson string, lexicon string, ...) error
- func HandleFiletypeSplitter(handler fiber.Handler) fiber.Handler
- func InitServer(config *config.Config)
- func InternalSearch(c *fiber.Ctx) error
- func MissingAuth(c *fiber.Ctx, err error) error
- func MobileClientApiDecider(c *fiber.Ctx) error
- func OAuthAccessToken(c *fiber.Ctx) error
- func PrivacyPolicy(c *fiber.Ctx) error
- func RedirectToLink(c *fiber.Ctx) error
- func RelatedResults(c *fiber.Ctx) error
- func RemovePush(c *fiber.Ctx) error
- func RequestToken(c *fiber.Ctx) error
- func ReturnError(c *fiber.Ctx, message string, error_code int, http_error int) error
- func ReturnSuccessfulAuth(c *fiber.Ctx, res blueskyapi.AuthResponse, pds string) error
- func SearchAhead(c *fiber.Ctx) error
- func ServeOAuthLoginPage(c *fiber.Ctx) error
- func SuggestedTopics(c *fiber.Ctx) error
- func TOS(c *fiber.Ctx) error
- func TranslatePostToTweet(tweet blueskyapi.Post, replyMsgBskyURI string, replyUserBskyId string, ...) bridge.Tweet
- func TweetInfo(c *fiber.Ctx) error
- func Unfavourite(c *fiber.Ctx) error
- func UnfollowUser(c *fiber.Ctx, actor string) error
- func UnfollowUserForm(c *fiber.Ctx) error
- func UnfollowUserParams(c *fiber.Ctx) error
- func UpdateProfile(c *fiber.Ctx) error
- func UpdateProfilePicture(c *fiber.Ctx) error
- func UpdatePushNotifications(c *fiber.Ctx) error
- func UserProfileImage(c *fiber.Ctx) error
- func UserRelationships(c *fiber.Ctx) error
- func UserSearch(c *fiber.Ctx) error
- func UsersLookup(c *fiber.Ctx) error
- func VerifyCredentials(c *fiber.Ctx) error
- func VerifyOAuthSignature(params *OAuthParams, method, requestURL, consumerSecret string) bool
- type BlueskyError
- type Error
- type Errors
- type OAuthParams
- type TempToken
- type TokenLockManager
- type TweetWithURI
- type TweetsRoot
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CDNDownscaler ¶
func CDNVideoProxy ¶
This is here because it doesn't just want a direct link to the m3u8 file. So we make an extremely basic site that just includes the video, and maybe the alt text if i care enough
func CheckTokenType ¶
Checks the token is V1 Returns the token type 1 = V1 2 = V2 or unknown
func ConvertV1TokenToV2 ¶
This function converts the legacy V1 token format into a valid V2 token. This is used for backwards compatibility with the old V1 tokens.
func DeleteTweet ¶
This handles deleting a tweet, retweet, or reply
func DevicePushDestinations ¶
func EncodeAndSend ¶
func FollowUser ¶
func GenerateNumericPIN ¶
func GetAuthFromReq ¶
GetAuthFromReq is a helper function to get the user DID and access token from the request. Also does some maintenance tasks like refreshing the access token if it has expired.
@return: userDID, pds, tokenUUID, accessJwt, error
func GetFollowers ¶
func GetFollowersIds ¶
func GetFollowingIds ¶
func GetFollows ¶
func GetListMembers ¶
func GetMyActivity ¶
/i/activity/about_me.json?contributor_details=1&include_entities=true&include_my_retweet=true&send_error_codes=true
func GetStatusFromId ¶
func GetStatusesFollowers ¶
https://web.archive.org/web/20101115102530/http://apiwiki.twitter.com/w/page/22554748/Twitter-REST-API-Method%3a-statuses%C2%A0followers At the moment we are not doing pagination, so this will only return the first ~50 followers.
func GetStatusesFollows ¶
https://web.archive.org/web/20120407214017/https://dev.twitter.com/docs/api/1/get/statuses/friends
func GetSuggestedUsers ¶
func GetTopicSuggestedUsers ¶
func GetUserInfoFromTweetData ¶
func GetUserInfoFromTweetData(tweet blueskyapi.Post) bridge.TwitterUser
This is "depercated"/a togglable option in the config (eventually) Primarly used as a fallback if we cannot lookup user info
func GetUsersLists ¶
https://web.archive.org/web/20120807220901/https://dev.twitter.com/docs/api/1/get/lists
func GetUsersRelationship ¶
Gets the relationship between two users https://web.archive.org/web/20120516154953/https://dev.twitter.com/docs/api/1/get/friendships/show
func HandleBlueskyError ¶
func InitServer ¶
func InternalSearch ¶
func OAuthAccessToken ¶
func PrivacyPolicy ¶
func RedirectToLink ¶
func RelatedResults ¶
Replies This is going to be painful to implement with lack of any docs
func RequestToken ¶
func ReturnError ¶
WARNING! This doesn't return a non-nil value
func ReturnSuccessfulAuth ¶
func ReturnSuccessfulAuth(c *fiber.Ctx, res blueskyapi.AuthResponse, pds string) error
func SearchAhead ¶
func ServeOAuthLoginPage ¶
func SuggestedTopics ¶
https://web.archive.org/web/20120516160451/https://dev.twitter.com/docs/api/1/get/users/suggestions
func TranslatePostToTweet ¶
func TranslatePostToTweet(tweet blueskyapi.Post, replyMsgBskyURI string, replyUserBskyId string, replyUserHandle string, replyTimeStamp *time.Time, postReason *blueskyapi.PostReason, token string, pds string) bridge.Tweet
This gigantic function is used to convert the bluesky post format, into a format that is compatible with the twitter API. https://web.archive.org/web/20120506182126/https://dev.twitter.com/docs/platform-objects/tweets
func TweetInfo ¶
This request is an "internal" request, and thus, these are very little to no docs. this is a problem. The most docs I could find: https://blog.fgribreau.com/2012/01/twitter-unofficial-api-getting-tweets.html
func Unfavourite ¶
func UnfollowUser ¶
func UnfollowUserForm ¶
func UnfollowUserParams ¶
func UpdateProfile ¶
func UpdateProfilePicture ¶
func UpdatePushNotifications ¶
func UserProfileImage ¶
func UserRelationships ¶
Gets the relationship between the authenticated user and the users specified another xml endpoint https://github.com/RuaanV/MyTwit/blob/3466157350ad8ce2ca4e3503ae3cc5bbbe3d3de4/MyTwit/LinqToTwitterAg/Friendship/FriendshipRequestProcessor.cs#L118 and https://web.archive.org/web/20120516155714/https://dev.twitter.com/docs/api/1/get/friendships/lookup
func UserSearch ¶
func UsersLookup ¶
https://web.archive.org/web/20120508165240/https://dev.twitter.com/docs/api/1/get/users/lookup
func VerifyCredentials ¶
func VerifyOAuthSignature ¶
func VerifyOAuthSignature(params *OAuthParams, method, requestURL, consumerSecret string) bool
Types ¶
type BlueskyError ¶
type OAuthParams ¶
type OAuthParams struct {
Callback string
ConsumerKey string
Nonce string
Signature string
SignatureMethod string
Timestamp string
Version string
//used in final oauth thingy
Verifier string
Token string
}
func ParseOAuthHeader ¶
func ParseOAuthHeader(header string) (*OAuthParams, error)
type TokenLockManager ¶
type TokenLockManager struct {
// contains filtered or unexported fields
}