models

package
v0.0.0-...-ebe21a7 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGoinstaUser

func NewGoinstaUser(u *User) *goinsta.User

Types

type Child

type Child struct {
	From string `json:"_from"`
	To   string `json:"_to"`
}

type Comments

type Comments struct {
	From string `json:"_from"`
	To   string `json:"_to"`
}

type Follows

type Follows struct {
	From string `json:"_from"`
	To   string `json:"_to"`
}

type Item

type Item struct {
	ScrapedAt time.Time `json:"scraped_at"`
	AddedAt   time.Time `json:"added_at"`

	TakenAt                      float64          `json:"taken_at"`
	Pk                           int64            `json:"pk"`
	ID                           string           `json:"id"`
	CommentsDisabled             bool             `json:"comments_disabled"`
	DeviceTimestamp              int64            `json:"device_timestamp"`
	MediaType                    int              `json:"media_type"`
	Code                         string           `json:"code"`
	ClientCacheKey               string           `json:"client_cache_key"`
	FilterType                   int              `json:"filter_type"`
	CarouselParentID             string           `json:"carousel_parent_id"`
	CanViewerReshare             bool             `json:"can_viewer_reshare"`
	Caption                      goinsta.Caption  `json:"caption"`
	CaptionIsEdited              bool             `json:"caption_is_edited"`
	Likes                        int              `json:"like_count"`
	HasLiked                     bool             `json:"has_liked"`
	Toplikers                    interface{}      `json:"top_likers"`
	CommentLikesEnabled          bool             `json:"comment_likes_enabled"`
	CommentThreadingEnabled      bool             `json:"comment_threading_enabled"`
	HasMoreComments              bool             `json:"has_more_comments"`
	MaxNumVisiblePreviewComments int              `json:"max_num_visible_preview_comments"`
	Previewcomments              interface{}      `json:"preview_comments,omitempty"`
	CommentCount                 int              `json:"comment_count"`
	PhotoOfYou                   bool             `json:"photo_of_you"`
	CanViewerSave                bool             `json:"can_viewer_save"`
	OrganicTrackingToken         string           `json:"organic_tracking_token"`
	Images                       goinsta.Images   `json:"image_versions2,omitempty"`
	OriginalWidth                int              `json:"original_width,omitempty"`
	OriginalHeight               int              `json:"original_height,omitempty"`
	ImportedTakenAt              int64            `json:"imported_taken_at,omitempty"`
	Location                     goinsta.Location `json:"location,omitempty"`
	Lat                          float64          `json:"lat,omitempty"`
	Lng                          float64          `json:"lng,omitempty"`

	// Videos
	Videos            []goinsta.Video `json:"video_versions,omitempty"`
	HasAudio          bool            `json:"has_audio,omitempty"`
	VideoDuration     float64         `json:"video_duration,omitempty"`
	ViewCount         float64         `json:"view_count,omitempty"`
	IsDashEligible    int             `json:"is_dash_eligible,omitempty"`
	VideoDashManifest string          `json:"video_dash_manifest,omitempty"`
	NumberOfQualities int             `json:"number_of_qualities,omitempty"`

	// Only for stories
	StoryEvents              []interface{} `json:"story_events"`
	StoryHashtags            []interface{} `json:"story_hashtags"`
	StoryPolls               []interface{} `json:"story_polls"`
	StoryFeedMedia           []interface{} `json:"story_feed_media"`
	StorySoundOn             []interface{} `json:"story_sound_on"`
	CreativeConfig           interface{}   `json:"creative_config"`
	StoryLocations           []interface{} `json:"story_locations"`
	StorySliders             []interface{} `json:"story_sliders"`
	StoryQuestions           []interface{} `json:"story_questions"`
	StoryProductItems        []interface{} `json:"story_product_items"`
	SupportsReelReactions    bool          `json:"supports_reel_reactions"`
	ShowOneTapFbShareTooltip bool          `json:"show_one_tap_fb_share_tooltip"`
	HasSharedToFb            int64         `json:"has_shared_to_fb"`
	// contains filtered or unexported fields
}

TODO Tags, Comments, FBTags, Mentions, Carousel Media, Toplikers

func NewItem

func NewItem(i goinsta.Item) *Item

func (*Item) GetMeta

func (i *Item) GetMeta() driver.DocumentMeta

func (*Item) SetMeta

func (i *Item) SetMeta(meta driver.DocumentMeta)

type Likes

type Likes struct {
	From       string `json:"_from"`
	To         string `json:"_to"`
	IsTopliker bool   `json:"is_topliker"`
}

type Mentions

type Mentions struct {
	From string `json:"_from"`
	To   string `json:"_to"`

	X        float64 `json:"x"`
	Y        float64 `json:"y"`
	Z        int64   `json:"z"`
	Width    float64 `json:"width"`
	Height   float64 `json:"height"`
	Rotation float64 `json:"rotation"`
	IsPinned int     `json:"is_pinned"`
}

func NewMention

func NewMention(i goinsta.Mentions) Mentions

type Posts

type Posts struct {
	From string `json:"_from"`
	To   string `json:"_to"`
}

type Tags

type Tags struct {
	From                  string      `json:"_from"`
	To                    string      `json:"_to"`
	Position              []float64   `json:"position"`
	StartTimeInVideoInSec interface{} `json:"start_time_in_video_in_sec"`
	DurationInVideoInSec  interface{} `json:"duration_in_video_in_sec"`
	FBUserTag             bool        `json:"fb_user_tag"`
}

func NewTags

func NewTags(i goinsta.Tag) []Tags

type User

type User struct {
	ScrapedAt time.Time `json:"scraped_at"`
	AddedAt   time.Time `json:"added_at"`

	ID                         int64   `json:"id"`
	Username                   string  `json:"username"`
	FullName                   string  `json:"full_name"`
	Biography                  string  `json:"biography"`
	ProfilePicURL              string  `json:"profile_pic_url"`
	Email                      string  `json:"email"`
	PhoneNumber                string  `json:"phone_number"`
	IsBusiness                 bool    `json:"is_business"`
	Gender                     int     `json:"gender"`
	ProfilePicID               string  `json:"profile_pic_id"`
	HasAnonymousProfilePicture bool    `json:"has_anonymous_profile_picture"`
	IsPrivate                  bool    `json:"is_private"`
	IsUnpublished              bool    `json:"is_unpublished"`
	AllowedCommenterType       string  `json:"allowed_commenter_type"`
	IsVerified                 bool    `json:"is_verified"`
	MediaCount                 int     `json:"media_count"`
	FollowerCount              int     `json:"follower_count"`
	FollowingCount             int     `json:"following_count"`
	FollowingTagCount          int     `json:"following_tag_count"`
	MutualFollowersID          []int64 `json:"profile_context_mutual_follow_ids"`
	ProfileContext             string  `json:"profile_context"`
	GeoMediaCount              int     `json:"geo_media_count"`
	ExternalURL                string  `json:"external_url"`
	HasBiographyTranslation    bool    `json:"has_biography_translation"`
	ExternalLynxURL            string  `json:"external_lynx_url"`
	BiographyWithEntities      struct {
		RawText  string        `json:"raw_text"`
		Entities []interface{} `json:"entities"`
	} `json:"biography_with_entities"`
	UsertagsCount                int                  `json:"usertags_count"`
	HasChaining                  bool                 `json:"has_chaining"`
	IsFavorite                   bool                 `json:"is_favorite"`
	IsFavoriteForStories         bool                 `json:"is_favorite_for_stories"`
	IsFavoriteForHighlights      bool                 `json:"is_favorite_for_highlights"`
	CanBeReportedAsFraud         bool                 `json:"can_be_reported_as_fraud"`
	ShowShoppableFeed            bool                 `json:"show_shoppable_feed"`
	ShoppablePostsCount          int                  `json:"shoppable_posts_count"`
	ReelAutoArchive              string               `json:"reel_auto_archive"`
	HasHighlightReels            bool                 `json:"has_highlight_reels"`
	PublicEmail                  string               `json:"public_email"`
	PublicPhoneNumber            string               `json:"public_phone_number"`
	PublicPhoneCountryCode       string               `json:"public_phone_country_code"`
	ContactPhoneNumber           string               `json:"contact_phone_number"`
	CityID                       int64                `json:"city_id"`
	CityName                     string               `json:"city_name"`
	AddressStreet                string               `json:"address_street"`
	DirectMessaging              string               `json:"direct_messaging"`
	Latitude                     float64              `json:"latitude"`
	Longitude                    float64              `json:"longitude"`
	Category                     string               `json:"category"`
	BusinessContactMethod        string               `json:"business_contact_method"`
	IncludeDirectBlacklistStatus bool                 `json:"include_direct_blacklist_status"`
	HdProfilePicURLInfo          goinsta.PicURLInfo   `json:"hd_profile_pic_url_info"`
	HdProfilePicVersions         []goinsta.PicURLInfo `json:"hd_profile_pic_versions"`
	School                       goinsta.School       `json:"school"`
	Byline                       string               `json:"byline"`
	SocialContext                string               `json:"social_context,omitempty"`
	SearchSocialContext          string               `json:"search_social_context,omitempty"`
	MutualFollowersCount         float64              `json:"mutual_followers_count"`
	LatestReelMedia              int64                `json:"latest_reel_media,omitempty"`
	IsCallToActionEnabled        bool                 `json:"is_call_to_action_enabled"`
	FbPageCallToActionID         string               `json:"fb_page_call_to_action_id"`
	Zip                          string               `json:"zip"`
	Friendship                   goinsta.Friendship   `json:"friendship_status"`
	// contains filtered or unexported fields
}

func NewUser

func NewUser(i goinsta.User) *User

func (*User) GetMeta

func (u *User) GetMeta() driver.DocumentMeta

func (*User) SetMeta

func (u *User) SetMeta(meta driver.DocumentMeta)

Jump to

Keyboard shortcuts

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