MCPcopy Create free account
hub / github.com/Preloading/TwitterAPIBridge / UnfollowUserParams

Function UnfollowUserParams

twitterv1/user.go:399–416  ·  view source on GitHub ↗
(c *fiber.Ctx)

Source from the content-addressed store, hash-verified

397}
398
399func UnfollowUserParams(c *fiber.Ctx) error {
400 // This should allow lookup with a handle, but tbh, i'm too lazy to implement that right now as i do not see it being used.
401 actor := c.Params("id")
402 actorID, err := strconv.ParseInt(actor, 10, 64)
403 if err != nil {
404 return ReturnError(c, "Invalid ID format", 195, 403)
405 }
406 actorPtr, err := bridge.TwitterIDToBlueSky(&actorID)
407 if err != nil {
408 return ReturnError(c, "ID not found.", 144, fiber.StatusNotFound)
409 }
410 if actorPtr == nil {
411 return ReturnError(c, "ID not found.", 144, fiber.StatusNotFound)
412 }
413 actor = *actorPtr
414
415 return UnfollowUser(c, actor)
416}
417
418// https://web.archive.org/web/20101115102530/http://apiwiki.twitter.com/w/page/22554748/Twitter-REST-API-Method%3a-statuses%C2%A0followers
419// At the moment we are not doing pagination, so this will only return the first ~50 followers.

Callers

nothing calls this directly

Calls 3

TwitterIDToBlueSkyFunction · 0.92
ReturnErrorFunction · 0.85
UnfollowUserFunction · 0.70

Tested by

no test coverage detected