go get github.com/erkanzsy/threads-api
package main
import (
"fmt"
threadsapi "github.com/erkanzsy/threads-api"
)
func main() {
userId, err := threadsapi.UserIDFromUsername("zuck")
if err != nil {
fmt.Println(err)
}
fmt.Println(userId) // 314216
profile, err := threadsapi.UserProfile("zuck", "314216")
if err != nil {
fmt.Println(err)
}
fmt.Println(profile.Data.UserData.User.Username) // zuck
threads, err := threadsapi.UserThreads("zuck", "314216")
if err != nil {
fmt.Println(err)
}
fmt.Println(threads.Data.MediaData.Threads[0].ThreadItems[0].Post.User.Username) // zuck
}
☢️ ** This package cannot be held responsible for any issues that may arise. The risk belongs to the user. If you perceive any risks, please refrain from using it.