instaresp

package
v0.0.0-...-3444db6 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const TableName = "instaresp"

Variables

This section is empty.

Functions

func LoadConfig

func LoadConfig(dbconn *sqlite3.SQLite) error

Types

type ChildrenEdge

type ChildrenEdge struct {
	Node ChildrenNode `json:"node"`
}

type ChildrenNode

type ChildrenNode struct {
	ID         string `json:"id"`
	DisplayURL string `json:"display_url"`
	IsVideo    bool   `json:"is_video"`
	VideoURL   string `json:"video_url"`
}

type Data

type Data struct {
	User User `json:"user"`
}

type Edge

type Edge struct {
	Node Node `json:"node"`
}

type Eottm

type Eottm struct {
	Count    uint     `json:"count"`
	PageInfo PageInfo `json:"page_info"`
	Edges    []Edge   `json:"edges"`
}

type Estc

type Estc struct {
	Edges []ChildrenEdge `json:"edges"`
}

type InstaResp

type InstaResp struct {
	UserID   string
	UserName string
	Checked  time.Time
	Response Response
}

func (*InstaResp) GetFiles

func (ir *InstaResp) GetFiles() []RespFile

func (*InstaResp) Load

func (ir *InstaResp) Load(dbconn *sqlite3.SQLite) (bool, error)

func (*InstaResp) Save

func (ir *InstaResp) Save(tx *sql.Tx) error

type Node

type Node struct {
	ID                    string `json:"id"`
	DisplayURL            string `json:"display_url"`
	IsVideo               bool   `json:"is_video"`
	VideoURL              string `json:"video_url"`
	Owner                 Owner  `json:"owner"`
	EdgeSidecarToChildren Estc   `json:"edge_sidecar_to_children"`
}

type Owner

type Owner struct {
	ID       string `json:"id"`
	UserName string `json:"username"`
}

type PageInfo

type PageInfo struct {
	HasNextPage bool   `json:"has_next_page"`
	EndCursor   string `json:"end_cursor"`
}

type RespFile

type RespFile struct {
	FileID     string
	DisplayURL string
	IsVideo    bool
	VideoURL   string
}

type Response

type Response struct {
	Data   Data   `json:"data"`
	Status string `json:"status"`
}

func (*Response) Marshal

func (ir *Response) Marshal() ([]byte, error)

func (*Response) Unmarshal

func (ir *Response) Unmarshal(b []byte) error

type User

type User struct {
	Eottm Eottm `json:"edge_owner_to_timeline_media"`
}

Jump to

Keyboard shortcuts

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