Skip to content

erkanzsy/threads-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

threads-api

Installation

go get github.com/erkanzsy/threads-api

Usage

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
}

Unit Tests


☢️ ** 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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages