onlyfans

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2023 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDynamicRules

func NewDynamicRules() (*viper.Viper, error)

Types

type Following added in v0.1.5

type Following struct {
	UsersCount int `json:"usersCount"`
}

type GetMediaOptions

type GetMediaOptions struct {
	Limit             int     `url:"limit,omitempty"`
	Order             string  `url:"order,omitempty"`
	SkipUsers         string  `url:"skip_users,omitempty"`
	Format            string  `url:"format,omitempty"`
	Counters          int     `url:"counters,omitempty"`
	BeforePublishTime *string `url:"beforePublishTime,omitempty"`
}

type GetMessagesOptions added in v0.0.3

type GetMessagesOptions struct {
	Limit     int    `url:"limit,omitempty"`
	Order     string `url:"order,omitempty"`
	SkipUsers string `url:"skip_users,omitempty"`
	ID        *int   `url:"id,omitempty"`
}

type GetSubscriptionsOptions

type GetSubscriptionsOptions struct {
	Offset int    `url:"offset"`
	Limit  int    `url:"limit"`
	Type   string `url:"type"`
	Sort   string `url:"sort"`
	Field  string `url:"field"`
}

type Media

type Media struct {
	ID        int    `json:"id"`
	CreatedAt string `json:"createdAt"`
	Type      string `json:"type"`
	Full      string `json:"full"`
}

type MediaPost

type MediaPost struct {
	ID     int `json:"id"`
	Author struct {
		ID int `json:"id"`
	} `json:"author"`
	Text            string  `json:"text"`
	PostedAt        string  `json:"postedAt"`
	PostedAtPrecise string  `json:"postedAtPrecise"`
	Media           []Media `json:"media"`
}

type Message added in v0.0.3

type Message struct {
	ID       int `json:"id"`
	FromUser struct {
		ID int `json:"id"`
	} `json:"fromUser"`
	CreatedAt  string         `json:"createdAt"`
	MediaCount int            `json:"mediaCount"`
	Media      []MessageMedia `json:"media"`
	Text       string         `json:"text"`
}

type MessageMedia added in v0.0.3

type MessageMedia struct {
	ID      int     `json:"id"`
	Type    string  `json:"type"`
	CanView bool    `json:"canView"`
	Src     *string `json:"src"`
}

type OnlyFans

type OnlyFans struct {
	*sling.Sling
	// contains filtered or unexported fields
}

func (*OnlyFans) Following added in v0.1.5

func (o *OnlyFans) Following() (*Following, error)

func (*OnlyFans) GetMediaPosts

func (o *OnlyFans) GetMediaPosts(uid int, beforePublishTime *string) (*PaginatedList[MediaPost], error)

func (*OnlyFans) GetMessages added in v0.0.3

func (o *OnlyFans) GetMessages(uid int, id *int) (*PagableList[Message], error)

func (*OnlyFans) GetSubscriptions

func (o *OnlyFans) GetSubscriptions(limit, offset int) ([]Subscription, error)

type OnlyFansAPI

type OnlyFansAPI interface {
	Following() (*Following, error)
	GetSubscriptions(limit, offset int) ([]Subscription, error)
	GetMediaPosts(uid int, beforePublishTime *string) (*PaginatedList[MediaPost], error)
	GetMessages(uid int, id *int) (*PagableList[Message], error)
}

func NewOnlyFans

func NewOnlyFans() (OnlyFansAPI, error)

type PagableList added in v0.0.3

type PagableList[T any] struct {
	HasMore bool `json:"hasMore"`
	List    []T  `json:"list"`
}

type PaginatedList

type PaginatedList[T any] struct {
	HasMore    bool   `json:"hasMore"`
	HeadMarker string `json:"headMarker"`
	TailMarker string `json:"tailMarker"`
	List       []T    `json:"list"`
	Counters   struct {
		MediasCount int `json:"mediasCount"`
		PostsCount  int `json:"postsCount"`
	} `json:"counters"`
}

type Subscription

type Subscription struct {
	ID       int    `json:"id"`
	Avatar   string `json:"avatar"`
	Header   string `json:"header"`
	Name     string `json:"name"`
	Username string `json:"username"`
}

Jump to

Keyboard shortcuts

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