Documentation ¶
Overview ¶
goinsta project goinsta.go
Index ¶
- Constants
- Variables
- func MediaFromCode(code string) string
- type BackupType
- type Informations
- type InstaType
- type Instagram
- func (insta *Instagram) AutoCompleteUserList() error
- func (insta *Instagram) Block(userID int64) ([]byte, error)
- func (insta *Instagram) ChangePassword(newpassword string) ([]byte, error)
- func (insta *Instagram) Comment(mediaID, text string) ([]byte, error)
- func (insta *Instagram) DeleteComment(mediaID, commentID string) ([]byte, error)
- func (insta *Instagram) DeleteMedia(mediaID string) ([]byte, error)
- func (insta *Instagram) DirectMessage(recipient string, message string) (response.DirectMessageResponse, error)
- func (insta *Instagram) EditMedia(mediaID string, caption string) ([]byte, error)
- func (insta *Instagram) Explore() (response.ExploreResponse, error)
- func (insta *Instagram) Export(key []byte) ([]byte, error)
- func (insta *Instagram) Expose() error
- func (insta *Instagram) Follow(userID int64) (response.FollowResponse, error)
- func (insta *Instagram) GetDirectPendingRequests() (response.DirectPendingRequests, error)
- func (insta *Instagram) GetDirectThread(threadid string) (response.DirectThread, error)
- func (insta *Instagram) GetFollowingRecentActivity() (response.FollowingRecentActivityResponse, error)
- func (insta *Instagram) GetLocationFeed(locationID int64, maxID string) (response.LocationFeedResponse, error)
- func (insta *Instagram) GetPopularFeed() (response.GetPopularFeedResponse, error)
- func (insta *Instagram) GetProfileData() (response.ProfileDataResponse, error)
- func (insta *Instagram) GetRankedRecipients() (response.DirectRankedRecipients, error)
- func (insta *Instagram) GetRecentActivity() ([]byte, error)
- func (insta *Instagram) GetRecentRecipients() ([]byte, error)
- func (insta *Instagram) GetReelsTrayFeed() (response.TrayResponse, error)
- func (insta *Instagram) GetSessions(url *url.URL) []*http.Cookie
- func (insta *Instagram) GetTagRelated(tag string) (response.TagRelatedResponse, error)
- func (insta *Instagram) GetUserByID(userID int64) (response.GetUsernameResponse, error)
- func (insta *Instagram) GetUserByUsername(username string) (response.GetUsernameResponse, error)
- func (insta *Instagram) GetUserStories(userID int64) (response.TrayUserResponse, error)
- func (insta *Instagram) GetV2Inbox() (response.DirectListResponse, error)
- func (insta *Instagram) LatestFeed() (response.UserFeedResponse, error)
- func (insta *Instagram) LatestUserFeed(userID int64) (response.UserFeedResponse, error)
- func (insta *Instagram) Like(mediaID string) ([]byte, error)
- func (insta *Instagram) Login() error
- func (insta *Instagram) Logout() error
- func (insta *Instagram) MediaComments(mediaID string, maxID string) (response.MediaCommentsResponse, error)
- func (insta *Instagram) MediaInfo(mediaID string) (response.MediaInfoResponse, error)
- func (insta *Instagram) MediaLikers(mediaID string) (response.MediaLikersResponse, error)
- func (insta *Instagram) MegaphoneLog() error
- func (insta *Instagram) NewUploadID() int64
- func (insta *Instagram) OptionalRequest(endpoint string, a ...interface{}) (body []byte, err error)
- func (insta *Instagram) RemoveProfilePicture() (response.ProfileDataResponse, error)
- func (insta *Instagram) RemoveSelfTag(mediaID string) ([]byte, error)
- func (insta *Instagram) SearchFacebookUsers(query string) ([]byte, error)
- func (insta *Instagram) SearchLocation(lat, lng, search string) (response.SearchLocationResponse, error)
- func (insta *Instagram) SearchTags(query string) (response.SearchTagsResponse, error)
- func (insta *Instagram) SearchUsername(query string) (response.SearchUserResponse, error)
- func (insta *Instagram) SelfTotalUserFollowers() (response.UsersResponse, error)
- func (insta *Instagram) SelfTotalUserFollowing() (response.UsersResponse, error)
- func (insta *Instagram) SelfUserFollowers(maxID string) (response.UsersResponse, error)
- func (insta *Instagram) SelfUserFollowing(maxID string) (response.UsersResponse, error)
- func (insta *Instagram) SetCookies(url *url.URL, cookies []*http.Cookie) error
- func (insta *Instagram) SetPrivateAccount() (response.ProfileDataResponse, error)
- func (insta *Instagram) SetPublicAccount() (response.ProfileDataResponse, error)
- func (insta *Instagram) SyncFeatures() error
- func (insta *Instagram) TagFeed(tag string) (response.TagFeedsResponse, error)
- func (insta *Instagram) Timeline(maxID string) (r response.FeedsResponse, err error)
- func (insta *Instagram) TotalUserFollowers(userID int64) (response.UsersResponse, error)
- func (insta *Instagram) TotalUserFollowing(userID int64) (response.UsersResponse, error)
- func (insta *Instagram) UnBlock(userID int64) ([]byte, error)
- func (insta *Instagram) UnFollow(userID int64) (response.UnFollowResponse, error)
- func (insta *Instagram) UnLike(mediaID string) ([]byte, error)
- func (insta *Instagram) UploadPhoto(photo_path string, photo_caption string, upload_id int64, quality int, ...) (response.UploadPhotoResponse, error)
- func (insta *Instagram) UploadPhotoFromReader(photo io.Reader, photo_caption string, upload_id int64, quality int, ...) (response.UploadPhotoResponse, error)
- func (insta *Instagram) UserFeed(userID int64, maxID, minTimestamp string) (response.UserFeedResponse, error)
- func (insta *Instagram) UserFollowers(userID int64, maxID string) (response.UsersResponse, error)
- func (insta *Instagram) UserFollowing(userID int64, maxID string) (response.UsersResponse, error)
- func (insta *Instagram) UserFriendShip(userID int64) (response.UserFriendShipResponse, error)
- type Secret
Constants ¶
const ( Filter_Walden = 20 Filter_Crema = 616 Filter_Reyes = 614 Filter_Moon = 111 Filter_Ashby = 116 Filter_Maven = 118 Filter_Brannan = 22 Filter_Hefe = 21 Filter_Valencia = 25 Filter_Clarendon = 112 Filter_Helena = 117 Filter_Brooklyn = 115 Filter_Dogpatch = 105 Filter_Ludwig = 603 Filter_Stinson = 109 Filter_Inkwell = 10 Filter_Rise = 23 Filter_Perpetua = 608 Filter_Juno = 613 Filter_Charmes = 108 Filter_Ginza = 107 Filter_Hudson = 26 Filter_Normat = 0 Filter_Slumber = 605 Filter_Lark = 615 Filter_Skyline = 113 Filter_Kelvin = 16 Filter_1977 = 14 Filter_Lo_Fi = 2 Filter_Aden = 612 Filter_Amaro = 24 Filter_Sutro = 18 Filter_Vasper = 106 Filter_Nashville = 15 Filter_X_Pro_II = 1 Filter_Mayfair = 17 Filter_Toaster = 19 Filter_Earlybird = 3 Filter_Willow = 28 Filter_Sierra = 27 Filter_Gingham = 114 GOINSTA_API_URL = "https://i.instagram.com/api/v1/" GOINSTA_USER_AGENT = "Instagram 10.26.0 Android (18/4.3; 320dpi; 720x1280; Xiaomi; HM 1SW; armani; qcom; en_US)" GOINSTA_IG_SIG_KEY = "4f8732eb9ba7d1c8e8897a75d6474d4eb3f5279137431b2aafb71fafe2abe178" GOINSTA_EXPERIMENTS = "" /* 12761-byte string literal not displayed */ GOINSTA_SIG_KEY_VERSION = "4" )
Const values , GOINSTA Default variables contains API url , user agent and etc... GOINSTA_IG_SIG_KEY is Instagram sign key, It's important Filter_<name>
const Base64UrlCharmap = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"
Base64UrlCharmap - all posible characters
Variables ¶
var GOINSTA_DEVICE_SETTINGS = map[string]interface{}{
"manufacturer": "Xiaomi",
"model": "HM 1SW",
"android_version": 18,
"android_release": "4.3",
}
GOINSTA_DEVICE_SETTINGS variable is a simulate of an android device
Functions ¶
func MediaFromCode ¶
Types ¶
type BackupType ¶
type Informations ¶
type InstaType ¶
type InstaType struct { IsLoggedIn bool Informations Informations LoggedInUser response.User // contains filtered or unexported fields }
type Instagram ¶
type Instagram struct { InstaType // contains filtered or unexported fields }
func New ¶
New try to fill Instagram struct New does not try to login , it will only fill Instagram struct
func NewViaProxy ¶
NewViaProxy All requests will use proxy server (example http://<ip>:<port>)
func (*Instagram) AutoCompleteUserList ¶
AutoCompleteUserList simulates Instagram app behavior
func (*Instagram) ChangePassword ¶
func (*Instagram) DeleteComment ¶
func (*Instagram) DirectMessage ¶
func (*Instagram) Expose ¶
Expose , expose instagram return error if status was not 'ok' or runtime error
func (*Instagram) Follow ¶
func (insta *Instagram) Follow(userID int64) (response.FollowResponse, error)
Follow one of instagram users with userID , you can find userID in GetUsername
func (*Instagram) GetDirectPendingRequests ¶
func (insta *Instagram) GetDirectPendingRequests() (response.DirectPendingRequests, error)
func (*Instagram) GetDirectThread ¶
func (insta *Instagram) GetDirectThread(threadid string) (response.DirectThread, error)
func (*Instagram) GetFollowingRecentActivity ¶
func (insta *Instagram) GetFollowingRecentActivity() (response.FollowingRecentActivityResponse, error)
func (*Instagram) GetLocationFeed ¶
func (insta *Instagram) GetLocationFeed(locationID int64, maxID string) (response.LocationFeedResponse, error)
GetLocationFeed return location feed data by locationID in Instagram
func (*Instagram) GetPopularFeed ¶
func (insta *Instagram) GetPopularFeed() (response.GetPopularFeedResponse, error)
func (*Instagram) GetProfileData ¶
func (insta *Instagram) GetProfileData() (response.ProfileDataResponse, error)
GetProfileData return current user information
func (*Instagram) GetRankedRecipients ¶
func (insta *Instagram) GetRankedRecipients() (response.DirectRankedRecipients, error)
func (*Instagram) GetRecentActivity ¶
func (*Instagram) GetRecentRecipients ¶
func (*Instagram) GetReelsTrayFeed ¶
func (insta *Instagram) GetReelsTrayFeed() (response.TrayResponse, error)
GetTrayFeeds - Get all available Instagram stories of your friends
func (*Instagram) GetSessions ¶
GetSessions return current instagram session and cookies Maybe need for webpages that use this API
func (*Instagram) GetTagRelated ¶
func (insta *Instagram) GetTagRelated(tag string) (response.TagRelatedResponse, error)
GetTagRelated can get related tags by tags in instagram
func (*Instagram) GetUserByID ¶
func (insta *Instagram) GetUserByID(userID int64) (response.GetUsernameResponse, error)
GetuserID return information of a user by user ID
func (*Instagram) GetUserByUsername ¶
func (insta *Instagram) GetUserByUsername(username string) (response.GetUsernameResponse, error)
GetUsername return information of a user by username
func (*Instagram) GetUserStories ¶
func (insta *Instagram) GetUserStories(userID int64) (response.TrayUserResponse, error)
GetUserStories - Get all available Instagram stories for the given user id
func (*Instagram) GetV2Inbox ¶
func (insta *Instagram) GetV2Inbox() (response.DirectListResponse, error)
func (*Instagram) LatestFeed ¶
func (insta *Instagram) LatestFeed() (response.UserFeedResponse, error)
LatestFeed - Get the latest page of your own Instagram feed.
func (*Instagram) LatestUserFeed ¶
func (insta *Instagram) LatestUserFeed(userID int64) (response.UserFeedResponse, error)
LatestUserFeed - Get the latest Instagram feed for the given user id
func (*Instagram) Login ¶
Login to Instagram. return error if can't send request to instagram server
func (*Instagram) MediaComments ¶
func (insta *Instagram) MediaComments(mediaID string, maxID string) (response.MediaCommentsResponse, error)
MediaComments - Returns comments of a media, input is mediaid of a media You can use maxID for pagination, otherwise leave it empty to get the latest page only.
func (*Instagram) MediaInfo ¶
func (insta *Instagram) MediaInfo(mediaID string) (response.MediaInfoResponse, error)
MediaInfo return media information
func (*Instagram) MediaLikers ¶
func (insta *Instagram) MediaLikers(mediaID string) (response.MediaLikersResponse, error)
MediaLikers return likers of a media , input is mediaid of a media
func (*Instagram) MegaphoneLog ¶
MegaphoneLog simulates Instagram app behavior
func (*Instagram) NewUploadID ¶
NewUploadID return unix nano time
func (*Instagram) OptionalRequest ¶
func (*Instagram) RemoveProfilePicture ¶
func (insta *Instagram) RemoveProfilePicture() (response.ProfileDataResponse, error)
RemoveProfilePicture will remove current logged in user profile picture
func (*Instagram) RemoveSelfTag ¶
func (*Instagram) SearchFacebookUsers ¶
func (*Instagram) SearchLocation ¶
func (insta *Instagram) SearchLocation(lat, lng, search string) (response.SearchLocationResponse, error)
SearchLocation return search location by lat & lng & search query in instagram
func (*Instagram) SearchTags ¶
func (insta *Instagram) SearchTags(query string) (response.SearchTagsResponse, error)
func (*Instagram) SearchUsername ¶
func (insta *Instagram) SearchUsername(query string) (response.SearchUserResponse, error)
func (*Instagram) SelfTotalUserFollowers ¶
func (insta *Instagram) SelfTotalUserFollowers() (response.UsersResponse, error)
func (*Instagram) SelfTotalUserFollowing ¶
func (insta *Instagram) SelfTotalUserFollowing() (response.UsersResponse, error)
func (*Instagram) SelfUserFollowers ¶
func (insta *Instagram) SelfUserFollowers(maxID string) (response.UsersResponse, error)
func (*Instagram) SelfUserFollowing ¶
func (insta *Instagram) SelfUserFollowing(maxID string) (response.UsersResponse, error)
func (*Instagram) SetCookies ¶
SetCookies can enable us to set cookie, it'll be help for webpage that use this API without Login-again.
func (*Instagram) SetPrivateAccount ¶
func (insta *Instagram) SetPrivateAccount() (response.ProfileDataResponse, error)
SetPrivateAccount Sets account to private
func (*Instagram) SetPublicAccount ¶
func (insta *Instagram) SetPublicAccount() (response.ProfileDataResponse, error)
SetPublicAccount Sets account to public
func (*Instagram) SyncFeatures ¶
SyncFeatures simulates Instagram app behavior
func (*Instagram) TagFeed ¶
func (insta *Instagram) TagFeed(tag string) (response.TagFeedsResponse, error)
TagFeed search by tags in instagram
func (*Instagram) Timeline ¶
func (insta *Instagram) Timeline(maxID string) (r response.FeedsResponse, err error)
func (*Instagram) TotalUserFollowers ¶
func (insta *Instagram) TotalUserFollowers(userID int64) (response.UsersResponse, error)
func (*Instagram) TotalUserFollowing ¶
func (insta *Instagram) TotalUserFollowing(userID int64) (response.UsersResponse, error)
func (*Instagram) UnFollow ¶
func (insta *Instagram) UnFollow(userID int64) (response.UnFollowResponse, error)
UnFollow one of instagram users with userID , you can find userID in GetUsername
func (*Instagram) UploadPhoto ¶
func (insta *Instagram) UploadPhoto(photo_path string, photo_caption string, upload_id int64, quality int, filter_type int) (response.UploadPhotoResponse, error)
UploadPhoto can upload your photo file, stored in filesystem with any quality , better to use 87
func (*Instagram) UploadPhotoFromReader ¶
func (insta *Instagram) UploadPhotoFromReader(photo io.Reader, photo_caption string, upload_id int64, quality int, filter_type int) (response.UploadPhotoResponse, error)
UploadPhotoFromReader can upload your photo stored in io.Reader with any quality , better to use 87
func (*Instagram) UserFeed ¶
func (insta *Instagram) UserFeed(userID int64, maxID, minTimestamp string) (response.UserFeedResponse, error)
UserFeed - Returns the Instagram feed for the given user id. You can use maxID and minTimestamp for pagination, otherwise leave them empty to get the latest page only.
func (*Instagram) UserFollowers ¶
UserFollowers return followers of specific user skip maxid with empty string for get first page
func (*Instagram) UserFollowing ¶
UserFollowing return followings of specific user skip maxid with empty string for get first page
func (*Instagram) UserFriendShip ¶
func (insta *Instagram) UserFriendShip(userID int64) (response.UserFriendShipResponse, error)