instagram

package
v0.0.0-...-69efd9b Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2019 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetUserFeed

func GetUserFeed(ctx context.Context, username string) (feed *feeds.Feed, err error)

GetUserFeed returns the feed for a given Instagram user, specified by username.

Instagram uses Redux for state management, and this state is hydrated server-side before being served to clients. This state is parsed out of the HTML response, and the JSON data parsed out using regex.

Types

type EdgeMediaToCaption

type EdgeMediaToCaption struct {
	Edges []EdgeMediaToCaptionEdge `json:"edges"`
}

type EdgeMediaToCaptionEdge

type EdgeMediaToCaptionEdge struct {
	Node EdgeMediaToCaptionEdgeNode `json:"node"`
}

type EdgeMediaToCaptionEdgeNode

type EdgeMediaToCaptionEdgeNode struct {
	Text string `json:"text"`
}

type EdgeOwnerToTimelineMedia

type EdgeOwnerToTimelineMedia struct {
	Edges []EdgeOwnerToTimelineMediaEdge `json:"edges"`
}

type EdgeOwnerToTimelineMediaEdge

type EdgeOwnerToTimelineMediaEdge struct {
	Node EdgeOwnerToTimelineMediaEdgeNode `json:"node"`
}

type EdgeOwnerToTimelineMediaEdgeNode

type EdgeOwnerToTimelineMediaEdgeNode struct {
	EdgeMediaToCaption EdgeMediaToCaption `json:"edge_media_to_caption"`
	Shortcode          string             `json:"shortcode"`
	DisplayURL         string             `json:"display_url"`
	TakenAtTimestamp   int64              `json:"taken_at_timestamp"`
}

type EntryData

type EntryData struct {
	ProfilePages []ProfilePage `json:"ProfilePage"`
}

type GraphQL

type GraphQL struct {
	User GraphQLUser `json:"user"`
}

type GraphQLUser

type GraphQLUser struct {
	Biography string `json:"biography"`
	FullName  string `json:"full_name"`
	Username  string `json:"username"`

	EdgeOwnerToTimelineMedia EdgeOwnerToTimelineMedia `json:"edge_owner_to_timeline_media"`
}

type ProfilePage

type ProfilePage struct {
	GraphQL GraphQL `json:"graphql"`
}

type UserPageData

type UserPageData struct {
	EntryData `json:"entry_data"`
}

UserPageData represents the object Instagram uses to render the page.

Jump to

Keyboard shortcuts

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