TinderClient

package module
v0.0.0-...-6a5769e Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2020 License: MIT Imports: 12 Imported by: 0

README

TinderClient

Golang Tinder Sdk

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DownloadImage

func DownloadImage(photo UserPhotos, path string)

func LoginSms

func LoginSms(phone string) []byte

func NewTinderClient

func NewTinderClient(token string) *client

Types

type Config

type Config struct {
	// contains filtered or unexported fields
}

type HttpRequest

type HttpRequest interface {
	Get(url string) HttpRequest
	Post(url string) HttpRequest
	Set(name, value string) HttpRequest
	Send(value string) HttpRequest
	End() (string, []error)
}

type Instagram

type Instagram struct {
	LastFetchTime         time.Time         `json:"last_fetch_time"`
	CompletedInitialFetch bool              `json:"completed_initial_fetch"`
	Photos                []InstagramPhotos `json:"photos"`
	MediaCount            int               `json:"media_count"`
	ProfilePicture        string            `json:"profile_picture"`
	Username              string            `json:"username"`
}

type InstagramPhotos

type InstagramPhotos struct {
	Image     string `json:"image"`
	Thumbnail string `json:"thumbnail"`
	Ts        string `json:"ts"`
	Link      string `json:"link"`
}

type RecsCoreResponse

type RecsCoreResponse struct {
	Meta struct {
		Status int `json:"status"`
	} `json:"meta"`
	Data struct {
		Results []RecsCoreUser `json:"results"`
	} `json:"data"`
}

type RecsCoreUser

type RecsCoreUser struct {
	DistanceMi      int           `json:"distance_mi"`
	ConnectionCount int           `json:"connection_count"`
	CommonLikes     []interface{} `json:"common_likes"`
	CommonFriends   []interface{} `json:"common_friends"`
	ContentHash     string        `json:"content_hash"`
	Badges          []interface{} `json:"badges,omitempty"`
	Teaser          struct {
		String string `json:"string"`
	} `json:"teaser"`
	Teasers           []interface{} `json:"teasers"`
	SNumber           int           `json:"s_number"`
	SpotifyThemeTrack interface{}   `json:"spotify_theme_track,omitempty"`
	Instagram         Instagram     `json:"instagram,omitempty"`
	CommonConnections []interface{} `json:"common_connections,omitempty"`
	CommonInterests   []interface{} `json:"common_interests,omitempty"`
	UncommonInterests []interface{} `json:"uncommon_interests,omitempty"`
	SpotifyTopArtists []struct {
		Selected bool   `json:"selected"`
		Name     string `json:"name"`
		ID       string `json:"id"`
		TopTrack struct {
			URI   string `json:"uri"`
			Album struct {
				Images []struct {
					URL    string `json:"url"`
					Width  int    `json:"width"`
					Height int    `json:"height"`
				} `json:"images"`
				Name string `json:"name"`
				ID   string `json:"id"`
			} `json:"album"`
			Name       string `json:"name"`
			PreviewURL string `json:"preview_url"`
			Artists    []struct {
				Name string `json:"name"`
				ID   string `json:"id"`
			} `json:"artists"`
			ID string `json:"id"`
		} `json:"top_track"`
	} `json:"spotify_top_artists,omitempty"`
	IsTraveling         bool   `json:"is_traveling,omitempty"`
	ShowGenderOnProfile bool   `json:"show_gender_on_profile"`
	Type                string `json:"type"`
	User                User   `json:"user"`
}

type Request

type Request struct {
	// contains filtered or unexported fields
}

func NewRequest

func NewRequest() *Request

func (*Request) End

func (r *Request) End() (string, []error)

func (*Request) Get

func (r *Request) Get(url string) HttpRequest

func (*Request) Post

func (r *Request) Post(url string) HttpRequest

func (*Request) Send

func (r *Request) Send(value string) HttpRequest

func (*Request) Set

func (r *Request) Set(name, value string) HttpRequest

type TRequest

type TRequest struct {
	// contains filtered or unexported fields
}

func NewTRequest

func NewTRequest(token string) *TRequest

func (*TRequest) Get

func (t *TRequest) Get(url string, version string) (string, []error)

func (*TRequest) Post

func (t *TRequest) Post(url string, data string) (string, []error)

func (*TRequest) SetHeader

func (t *TRequest) SetHeader(key string, value string)

type Teaser

type Teaser struct {
	String string `json:string`
	Type   string `json:string`
}

type User

type User struct {
	Bio           string        `json:"bio"`
	BirthDate     time.Time     `json:"birth_date"`
	Name          string        `json:"name"`
	PingTime      time.Time     `json:"ping_time"`
	Photos        []UserPhotos  `json:"photos"`
	Jobs          []interface{} `json:"jobs"`
	Schools       []interface{} `json:"schools"`
	ID            string        `json:"_id"`
	Gender        int           `json:"gender"`
	BirthDateInfo string        `json:"birth_date_info"`
	Teasers       []Teaser      `json:"teasers"`
}

type UserPhotos

type UserPhotos struct {
	ID       string `json:"id"`
	URL      string `json:"url"`
	FileName string `json:"fileName"`
}

type UserResponse

type UserResponse struct {
	Result User `json:"results"`
	Status int  `json:"status"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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