iglog

package module
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2019 License: MIT Imports: 7 Imported by: 0

README

iglog

A repo for iglog

Godoc License Version Build

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event struct {
	T time.Time
	E EventType
	U goinsta.User
}

func (Event) String

func (e Event) String() string

type EventType

type EventType int
const (
	FollowerGained EventType = iota
	FollowerLost
	FollowingGained
	FollowingLost
)

type Events

type Events []Event

func NewEvents

func NewEvents() Events

func (Events) Add

func (e Events) Add(u goinsta.User, ev EventType) Events

func (Events) String

func (e Events) String() string

type IG

type IG struct {
	*goinsta.Instagram
}

IG holds authorization to use the Instagram api

func (*IG) MarshalJSON

func (i *IG) MarshalJSON() ([]byte, error)

func (*IG) UnmarshalJSON

func (i *IG) UnmarshalJSON(b []byte) error

type RawUsers

type RawUsers map[int64]goinsta.User

func NewRawUsers

func NewRawUsers() RawUsers

func (RawUsers) List

func (u RawUsers) List() Users

type User

type User struct {
	Username string
	Name     string
}

func NewUser

func NewUser(gu goinsta.User) User

type UserData

type UserData struct {
	IG *IG

	Events       Events
	NotFollower  RawUsers
	Mutual       RawUsers
	NotFollowing RawUsers
}

UserData holds the followers for a single user

func NewUserData

func NewUserData(user, pass string) (*UserData, error)

func (UserData) ListFollowers

func (u UserData) ListFollowers() Users

ListFollowers gets a user's followers, sorted by username

func (UserData) ListFollowing

func (u UserData) ListFollowing() Users

ListFollowing gets a user's following, sorted by username

func (*UserData) Update

func (u *UserData) Update() (Events, error)

Update attempts to update a user's followers / following

type Users

type Users []User

func NewUsers

func NewUsers() Users

func (Users) Sort

func (u Users) Sort()

func (Users) Strings

func (u Users) Strings() []string

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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