MCPcopy Create free account

hub / github.com/Preloading/TwitterAPIBridge / functions

Functions172 in github.com/Preloading/TwitterAPIBridge

↓ 148 callersFunctionReturnError
(c *fiber.Ctx, message string, error_code int, http_error int)
twitterv1/errorhandling.go:26
↓ 84 callersMethodGet
Get returns the cached shortcode for a URL
twitterv1/imagelink.go:25
↓ 56 callersFunctionHandleBlueskyError
(c *fiber.Ctx, responseJson string, lexicon string, function func(c *fiber.Ctx) error)
twitterv1/errorhandling.go:43
↓ 49 callersFunctionEncodeAndSend
(c *fiber.Ctx, data interface{})
twitterv1/twitterv1.go:167
↓ 39 callersFunctionSendRequest
Cache TTL of 5 minutes
bluesky/blueskyapi.go:405
↓ 35 callersFunctionGetAuthFromReq
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
twitterv1/auth.go:139
↓ 26 callersFunctionTwitterIDToBlueSky
TwitterIDToBlueSky converts a numeric ID to a letter ID
bridge/bridge.go:573
↓ 25 callersFunctionMissingAuth
(c *fiber.Ctx, err error)
twitterv1/errorhandling.go:94
↓ 24 callersFunctionTranslatePostToTweet
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/
twitterv1/post_viewing.go:279
↓ 15 callersFunctionBlueSkyToTwitterID
Bluesky's API returns a letter ID for each user, While twitter uses a numeric ID, meaning we need to convert between the two
bridge/bridge.go:560
↓ 13 callersFunctionTwitterMsgIdToBluesky
This is here soley because we have to use psudo ids for retweets.
bridge/bridge.go:606
↓ 9 callersFunctionStoreAnalyticData
Stores analytic data (if enabled) -- TYPES -- 1. "login" 2. "tweets viewed" 3. "tweets posted"
db_controller/analytics.go:18
↓ 8 callersFunctionBskyMsgToTwitterID
(uri string, creationTime *time.Time, retweetUserId *string)
bridge/bridge.go:583
↓ 6 callersFunctionGetJWTTokenExpirationUnix
it took me an embarrising long time to learn that the jwt tokens encode the expiration time inside of them
cryption/authcrypt.go:88
↓ 6 callersFunctionGetPost
(pds string, token string, uri string, depth int, parentHeight int)
bluesky/blueskyapi.go:880
↓ 6 callersFunctionconvert_timeline
https://web.archive.org/web/20120508224719/https://dev.twitter.com/docs/api/1/get/statuses/home_timeline
twitterv1/post_viewing.go:93
↓ 5 callersMethodSet
(key string, user TwitterUser)
bridge/usercache.go:31
↓ 5 callersMethodSet
Set caches a URL and its shortcode
twitterv1/imagelink.go:33
↓ 5 callersFunctionTwitterTimeConverter
FormatTime converts Go's time.Time into the format "Wed Sep 01 00:00:00 +0000 2021"
bridge/bridge.go:617
↓ 4 callersFunctionBase64URLDecode
Base64URLDecode decodes the given URL-safe string using base64 and returns the result as a string
cryption/authcrypt.go:128
↓ 4 callersFunctionCreateShortLink
(originalPath string, prefix string)
twitterv1/imagelink.go:57
↓ 4 callersMethodGet
(key string)
bridge/usercache.go:21
↓ 4 callersFunctionTidToNum
tidToNum converts a Bluesky TID into a 64-bit number.
bridge/tidconversions.go:36
↓ 3 callersFunctionStoreTwitterIdInDatabase
Stores ID data in the database. @params: twitterID, blueskyID, dateCreated, reposterDid @results: error
db_controller/db_controller.go:368
↓ 3 callersFunctionencodeToUint63
(input string)
bridge/bridge.go:548
↓ 2 callersFunctionAuthorTTB
https://web.archive.org/web/20121029153120/https://dev.twitter.com/docs/platform-objects/users
bluesky/blueskyapi.go:655
↓ 2 callersFunctionGetToken
GetToken retrieves account data from the database @results: accessToken, refreshToken, accessExpiry, refreshExpiry, pds, error
db_controller/db_controller.go:259
↓ 2 callersFunctionGetTwitterIDFromDatabase
Gets a twitter id from the database @params: twitterID @results: blueskyID, dateCreated, reposterDid, error
db_controller/db_controller.go:400
↓ 2 callersFunctionGetUserInfoRaw
(pds string, token string, screen_name string)
bluesky/blueskyapi.go:478
↓ 2 callersFunctionNumToTid
numToTid converts a 64-bit number into a Bluesky TID.
bridge/tidconversions.go:11
↓ 2 callersMethodSetMultiple
maybe not the most effiecent use of memory.
bridge/usercache.go:39
↓ 2 callersFunctionUnfollowUser
https://web.archive.org/web/20120407201029/https://dev.twitter.com/docs/api/1/post/friendships/create
twitterv1/user.go:351
↓ 2 callersFunctionUpdateToken
(uuid string, did string, pds string, accessToken string, refreshToken string, encryptionKey string, accessExp
db_controller/db_controller.go:170
↓ 2 callersFunctionUpdateTokenBasic
UpdateTokenBasic updates or creates a token entry using basic auth
db_controller/db_controller.go:224
↓ 2 callersFunctionchunkSlice
Helper functions
twitterv1/connect.go:292
↓ 2 callersMethodexpireKeyAfterTTL
(key string)
bridge/usercache.go:48
↓ 2 callersFunctionfindHandleInstances
(input string)
twitterv1/interaction.go:390
↓ 2 callersFunctionfindTagInstances
(input string)
twitterv1/interaction.go:418
↓ 2 callersFunctionfindUrlInstances
(input string)
twitterv1/interaction.go:404
↓ 2 callersFunctiongetUserMutex
(userID string)
twitterv1/account.go:18
↓ 1 callersFunctionCheckTokenType
Checks the token is V1 Returns the token type 1 = V1 2 = V2 or unknown
twitterv1/auth.go:356
↓ 1 callersFunctionConvertV1TokenToV2
This function converts the legacy V1 token format into a valid V2 token. This is used for backwards compatibility with the old V1 tokens.
twitterv1/auth.go:378
↓ 1 callersFunctionDeleteToken
DeleteToken deletes a token using did and uuid
db_controller/db_controller.go:317
↓ 1 callersFunctionDeleteTokenViaBasic
DeleteTokenViaBasic deletes a token using the username and password
db_controller/db_controller.go:329
↓ 1 callersFunctionGenerateKey
GenerateKey generates a new AES key and returns it as a base64 encoded string
cryption/authcrypt.go:18
↓ 1 callersFunctionGetLock
(userDID string)
twitterv1/auth.go:452
↓ 1 callersFunctionGetOriginalURL
GetOriginalURL retrieves the original URL from the database using the short code
db_controller/db_controller.go:466
↓ 1 callersFunctionGetRecord
(pds string, collection string, repo string, rkey string)
bluesky/blueskyapi.go:1694
↓ 1 callersFunctionGetReplyRefs
thank you https://docs.bsky.app/blog/create-post#replies
bluesky/blueskyapi.go:1652
↓ 1 callersFunctionGetTokenViaBasic
GetTokenViaBasic retrieves a token using only the password @results: accessToken, refreshToken, accessExpiry, refreshExpiry, pds, did, hash, salt, uui
db_controller/db_controller.go:280
↓ 1 callersFunctionGetURIComponents
Gets the URI components @param uri: The URI to ge split @return: collection, repo, rkey
bluesky/blueskyapi.go:2040
↓ 1 callersFunctionGetUserAuthData
This function is to get: the user DID and the user's PDS this should **ONLY** be used during authentication. @results: userDID, userPDS, error
bluesky/auth.go:92
↓ 1 callersFunctionGetUserInfoFromTweetData
This is "depercated"/a togglable option in the config (eventually) Primarly used as a fallback if we cannot lookup user info
twitterv1/post_viewing.go:751
↓ 1 callersFunctionGetUsersInfo
(pds string, token string, items []string, ignoreCache bool)
bluesky/blueskyapi.go:502
↓ 1 callersFunctionInitDB
(_cfg config.Config)
db_controller/db_controller.go:102
↓ 1 callersFunctionInitServer
(config *config.Config)
twitterv1/twitterv1.go:20
↓ 1 callersFunctionLoadConfig
Loads our config files.
config/config.go:51
↓ 1 callersFunctionNewCache
(ttl time.Duration)
bridge/usercache.go:14
↓ 1 callersFunctionResolveDIDFromHandle
(handle string)
bluesky/auth.go:111
↓ 1 callersFunctionResolvePDSFromDID
(userDID string)
bluesky/auth.go:155
↓ 1 callersFunctionSendRequestWithContentType
(token *string, method string, url string, body io.Reader, content_type string)
bluesky/blueskyapi.go:425
↓ 1 callersFunctionStartPeriodicAnalyticsWriter
(interval time.Duration)
db_controller/analytics.go:52
↓ 1 callersFunctionStoreShortLink
StoreShortLink stores a short link in the database with optimized collision handling
db_controller/db_controller.go:414
↓ 1 callersFunctionStoreToken
StoreToken stores an encrypted access token and refresh token in the database. It returns the UUID of the stored token or an error if the operation fa
db_controller/db_controller.go:153
↓ 1 callersFunctionStoreTokenBasic
StoreTokenBasic stores a token using basic auth (password)
db_controller/db_controller.go:208
↓ 1 callersFunctionWriteAnalyticsToDB
()
db_controller/analytics.go:26
↓ 1 callersFunctioncleanup
()
twitterv1/auth.go:437
↓ 1 callersMethodcopy
()
bridge/usercache.go:55
↓ 1 callersFunctiongetActionType
(reason string)
twitterv1/connect.go:391
↓ 1 callersFunctiongroupNotifications
(notifications []blueskyapi.Notification)
twitterv1/connect.go:310
↓ 1 callersFunctionprocessNotificationGroup
(group notificationGroup, userCache *sync.Map, postCache *sync.Map, myDID *string)
twitterv1/connect.go:335
↓ 1 callersFunctiontoBase62
(num uint64)
twitterv1/imagelink.go:39
FunctionAuthenticate
(username, password string)
bluesky/auth.go:24
FunctionBase64URLEncode
Base64URLEncode encodes the given string using base64 and returns the result as a URL-safe string
cryption/authcrypt.go:117
FunctionCDNDownscaler
(c *fiber.Ctx)
twitterv1/cdnproxy.go:20
FunctionCDNVideoProxy
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 t
twitterv1/cdnproxy.go:198
FunctionDecrypt
Decrypt decrypts the given base64 encoded ciphertext using AES-GCM with the provided base64 encoded key and returns the plaintext
cryption/authcrypt.go:53
FunctionDeleteRecord
(pds string, token string, id string, my_did string, collection string)
bluesky/blueskyapi.go:1188
FunctionDeleteTweet
This handles deleting a tweet, retweet, or reply
twitterv1/interaction.go:321
FunctionDeriveKeyFromPassword
DeriveKeyFromPassword generates an encryption key from a password using Argon2 and a provided salt
cryption/authcrypt.go:174
FunctionEncrypt
Encrypt encrypts the given plaintext using AES-GCM with the provided base64 encoded key and returns the ciphertext as a base64 encoded string
cryption/authcrypt.go:27
FunctionFollowUser
(pds string, token string, targetActor string, my_did string)
bluesky/blueskyapi.go:1360
FunctionFollowUser
https://web.archive.org/web/20120407201029/https://dev.twitter.com/docs/api/1/post/friendships/create
twitterv1/user.go:308
FunctionGeneratePasswordHash
GeneratePasswordHash generates a secure hash of the password using bcrypt, returns hash and salt
cryption/authcrypt.go:154
FunctionGetActorLikes
https://docs.bsky.app/docs/api/app-bsky-feed-get-actor-likes Bluesky for SOME REASON limits viewing the likes to your own user. WHy? What is the point
bluesky/blueskyapi.go:1494
FunctionGetEncryptionKeyFromRequest
(c *fiber.Ctx)
twitterv1/auth.go:331
FunctionGetFollowers
https://docs.bsky.app/docs/api/app-bsky-graph-get-followers
bluesky/blueskyapi.go:964
FunctionGetFollowers
(c *fiber.Ctx)
twitterv1/user.go:481
FunctionGetFollows
https://docs.bsky.app/docs/api/app-bsky-graph-get-follows
bluesky/blueskyapi.go:998
FunctionGetFollows
(c *fiber.Ctx)
twitterv1/user.go:657
FunctionGetHotPosts
https://docs.bsky.app/docs/api/app-bsky-feed-get-feed
bluesky/blueskyapi.go:748
FunctionGetList
(pds string, token string, listURI string, limit int, cursor string)
bluesky/blueskyapi.go:1823
FunctionGetListMembers
(c *fiber.Ctx)
twitterv1/lists.go:161
FunctionGetListTimeline
https://docs.bsky.app/docs/api/app-bsky-graph-get-list
bluesky/blueskyapi.go:847
FunctionGetMediaTimeline
(pds string, token string, context string, actor string, limit int)
bluesky/blueskyapi.go:813
FunctionGetMentions
(pds string, token string, limit int, context string)
bluesky/blueskyapi.go:1976
FunctionGetMyActivity
i/activity/about_me.json?contributor_details=1&include_entities=true&include_my_retweet=true&send_error_codes=true
twitterv1/connect.go:149
FunctionGetMySuggestedUsers
(pds string, token string, limit int)
bluesky/blueskyapi.go:1856
FunctionGetNotifications
(pds string, token string, limit int, context string)
bluesky/blueskyapi.go:1943
FunctionGetOthersSuggestedUsers
(pds string, token string, limit int, actor string)
bluesky/blueskyapi.go:1914
next →1–100 of 172, ranked by callers