Documentation ¶
Index ¶
- func GetThreadLikers(ID int) (*model.LikersResponse, error)
- func GetUserByUsername(username string) (int, error)
- type Config
- type ConfigFn
- func WithAPIToken(deviceID string, apitoken string) ConfigFn
- func WithCridential(username string, password string) ConfigFn
- func WithDefaultValue() ConfigFn
- func WithDeviceID(deviceID string) ConfigFn
- func WithDoLogin(username string, password string) ConfigFn
- func WithUserID(userID int) ConfigFn
- func WithUserIDFetching(username string) ConfigFn
- type PrivateAPI
- type PublicAPI
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetThreadLikers ¶ added in v0.0.2
func GetThreadLikers(ID int) (*model.LikersResponse, error)
func GetUserByUsername ¶
GetUserByUsername get user by username via instagram api
Types ¶
type Config ¶ added in v0.0.2
type Config struct { Username string Password string UserID int APIToken string TimezoneOffset int DeviceID string DeviceModel string DeviceManufacturer string DeviceOsVersion int DeviceOsRelease string }
Config config to init thread client
func InitConfig ¶ added in v0.0.2
InitConfig init configs
func (Config) ReadyCheck ¶ added in v0.0.2
type ConfigFn ¶ added in v0.0.2
ConfigFn define the function to update config data
func WithAPIToken ¶ added in v0.0.2
WithAPIToken
func WithCridential ¶ added in v0.0.2
WithCridential update the user cridential
func WithDefaultValue ¶ added in v0.0.2
func WithDefaultValue() ConfigFn
WithDefaultValue initial default value
func WithDeviceID ¶ added in v0.0.2
WithDeviceID update the device ID
func WithDoLogin ¶ added in v0.0.2
WithDoLogin fetch user id from instagram
func WithUserID ¶ added in v0.0.2
WithUserID update the user ID
func WithUserIDFetching ¶ added in v0.0.2
WithUserIDFetching fetch user id from instagram
type PrivateAPI ¶ added in v0.0.2
type PrivateAPI interface { CreatePost(content model.CreatePostRequest) (*model.CreatePostResponse, error) GetUserFollowers(id int) (*model.UserFollowersResponse, error) GetFollowers() (*model.UserFollowersResponse, error) GetFollowing() (*model.UserFollowingResponse, error) GetThreadByID(ID string) (*model.ThreadDetailResponse, error) SearchUser(query string) (*model.UserResponse, error) LikeThread(id string) (map[string]interface{}, error) UnLikeThread(id string) (map[string]interface{}, error) FollowUser(id int) (*model.FollowUserResponse, error) UnFollowUser(id int) (*model.FollowUserResponse, error) }
PrivateAPI interface for private API
func InitAPIClient ¶ added in v0.0.2
func InitAPIClient(cfgFn ...ConfigFn) (PrivateAPI, error)
InitAPIClient new api client for private API
func NewPrivateAPIClient ¶ added in v0.0.2
func NewPrivateAPIClient(cfg *Config) (PrivateAPI, error)
NewPrivateAPIClient new api client for private API
Click to show internal directories.
Click to hide internal directories.