constants

package
v0.2.2-alpha.0...-91a53d1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 14, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SIG_KEY       = "2f6dcdf76deb0d3fd008886d032162a79b88052b5f50538c1ee93c4fe7d02e60"
	SIG_VERSION   = "4"
	APP_VERSION   = "10.8.0"
	TAG_FEED      = "TagFeed"
	LOCATION_FEED = "LocationFeed"

	SigCsrfToken = "missing"
	SigDeviceID  = "android-b256317fd493b848"
	SigKey       = "109513c04303341a7daf27bb41b268e633b30dcc65a3fe14503f743176113869"
	SigVersion   = "4"
	AppVersion   = "27.0.0.7.97"
)

Variables

View Source
var API_ENDPOINT = HOST + "api/v1/"
View Source
var HOST = "https://" + HOSTNAME + "/"
View Source
var HOSTNAME = "i.instagram.com"
View Source
var ROUTES = struct {
	HOSTNAME     string
	WEB_HOSTNAME string
	HOST         string
	WEBHOST      string

	Comments             string
	ThreadsBroadcastText string
	Inbox                string
	Login                string
	LocationFeed         string
	LocationSearch       string
	LocationSections     string
	ThreadsApproveAll    string
	ThreadsShow          string
	TimelineFeed         string
	Like                 string
	Likers               string
	Unlike               string
	Users                string
	Followers            string
	Followings           string
	TagFeed              string
	UserFeed             string
}{
	HOSTNAME:     HOSTNAME,
	WEB_HOSTNAME: WEB_HOSTNAME,
	HOST:         HOST,
	WEBHOST:      WEBHOST,

	Comments:             API_ENDPOINT + "media/{{.ID}}/comments/?rank_token={{.RankToken}}{{if .MaxID}}&max_id={{.MaxID}}{{end}}",
	ThreadsBroadcastText: API_ENDPOINT + "direct_v2/threads/broadcast/text/",
	Inbox:                API_ENDPOINT + "direct_v2/inbox/",
	Login:                API_ENDPOINT + "accounts/login/",
	LocationFeed:         API_ENDPOINT + "feed/location/{{.ID}}/?{{if .MaxID}}&max_id={{.MaxID}}{{end}}",
	LocationSearch:       API_ENDPOINT + "fbsearch/places/?query={{.Query}}&rank_token={{.RankToken}}{{if .MaxID}}&max_id={{.MaxID}}{{end}}",
	LocationSections:     API_ENDPOINT + "locations/{{.ID}}/sections/?{{if .MaxID}}&max_id={{.MaxID}}{{end}}",
	ThreadsApproveAll:    API_ENDPOINT + "direct_v2/threads/approve_all/",
	ThreadsShow:          API_ENDPOINT + "direct_v2/threads/",
	TimelineFeed:         API_ENDPOINT + "feed/timeline/?rank_token={{.RankToken}}{{if .MaxID}}&max_id={{.MaxID}}{{end}}&ranked_content=true",
	Like:                 API_ENDPOINT + "media/{{.ID}}/like/",
	Likers:               API_ENDPOINT + "media/{{.ID}}/likers/?rank_token={{.RankToken}}{{if .MaxID}}&max_id={{.MaxID}}{{end}}",
	Unlike:               API_ENDPOINT + "media/{{.ID}}/unlike/",
	Users:                API_ENDPOINT + "users/{{.ID}}/usernameinfo/",
	TagFeed:              API_ENDPOINT + "feed/tag/{{.ID}}/?{{if .MaxID}}&max_id={{.MaxID}}{{end}}",
	UserFeed:             API_ENDPOINT + "feed/user/{{.ID}}/?rank_token={{.RankToken}}{{if .MaxID}}&max_id={{.MaxID}}{{end}}",
	Followers:            API_ENDPOINT + "friendships/{{.ID}}/followers/?rank_token={{.RankToken}}{{if .MaxID}}&max_id={{.MaxID}}{{end}}",
	Followings:           API_ENDPOINT + "friendships/{{.ID}}/following/?rank_token={{.RankToken}}{{if .MaxID}}&max_id={{.MaxID}}{{end}}",
}
View Source
var WEBHOST = "https://" + WEB_HOSTNAME + "/"
View Source
var WEB_HOSTNAME = "www.instagram.com"

Functions

func GetURL

func GetURL(name string, data interface{}) string

Types

type Content

type Content struct {
	Medias []MediaItem `json:"medias"`
}

type Location

type Location struct {
	LocationId struct {
		Pk int64 `json:"pk"`
	} `json:"location"`
}

type LocationSection

type LocationSection struct {
	LayoutType    string                        `json:"layout_type"`
	LayoutContent *LocationSectionLayoutContent `json:"layout_content"`
}

type LocationSectionLayoutContent

type LocationSectionLayoutContent struct {
	Medias []*LocationSectionLayoutContentMedias `json:"medias"`
}

type LocationSectionLayoutContentMedias

type LocationSectionLayoutContentMedias struct {
	Media *MediaItem `json:"media"`
}

type Media

type Media struct {
	Pk            int            `json:"pk"`
	User          UserCompetitor `json:"user"`
	CommentsCount int            `json:"comment_count"`
	LikesCount    int            `json:"like_count"`
	MediaType     int            `json:"media_type"`
}

type MediaItem

type MediaItem struct {
	Pk            int64          `json:"pk"`
	User          UserCompetitor `json:"user"`
	CommentsCount int64          `json:"comment_count"`
	LikesCount    int64          `json:"like_count"`
	MediaType     int64          `json:"media_type"`
}

type Section

type Section struct {
	LayoutContent Content `json:"layout_content"`
}

type TagIntersect

type TagIntersect struct {
	User struct {
		Username string `json:"username"`
	} `json:"user"`
	Caption struct {
		Text string `json:"text"`
	} `json:"caption"`
}

type UserCompetitor

type UserCompetitor struct {
	Username  string `json:"username"`
	Pk        int64  `json:"pk"`
	IsPrivate bool   `json:"is_private"`
	FullName  string `json:"full_name"`
}

type UserId

type UserId struct {
	Pk int64 `json:"pk"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL