Initialize Tinder API Wrapper with server configuration and Docker setup

This commit is contained in:
2025-03-20 22:19:48 +01:00
commit e99b56e434
17 changed files with 1459 additions and 0 deletions

91
types.go Normal file
View File

@@ -0,0 +1,91 @@
package tinder
// LikeResponse contains the response data from a like action
type LikeResponse struct {
Match bool `json:"match"`
LikesRemaining int `json:"likes_remaining"`
XPadding string `json:"X-Padding,omitempty"`
}
// PassResponse contains the response data from a pass action
type PassResponse struct {
Status string `json:"status"`
}
// RecsResponse contains recommendation data
type RecsResponse struct {
Meta struct {
Status int `json:"status"`
} `json:"meta"`
Data struct {
Results []UserRecommendation `json:"results"`
} `json:"data"`
}
// UserRecommendation represents a recommended user profile
type UserRecommendation struct {
Type string `json:"type"`
DistanceMi int `json:"distance_mi"`
ContentHash string `json:"content_hash"`
SNumber int `json:"s_number"`
User struct {
ID string `json:"_id"`
Bio string `json:"bio"`
BirthDate string `json:"birth_date"`
Name string `json:"name"`
Photos []Photo `json:"photos"`
Gender int `json:"gender"`
Jobs []any `json:"jobs"`
Schools []struct {
Name string `json:"name"`
} `json:"schools"`
} `json:"user"`
Instagram struct {
LastFetchTime string `json:"last_fetch_time"`
CompletedInitialFetch bool `json:"completed_initial_fetch"`
Photos []InstagramPhoto `json:"photos"`
MediaCount int `json:"media_count"`
ProfilePicture string `json:"profile_picture"`
} `json:"instagram"`
Spotify struct {
SpotifyConnected bool `json:"spotify_connected"`
SpotifyThemeTrack any `json:"spotify_theme_track"`
} `json:"spotify"`
}
// Photo represents a user photo
type Photo struct {
ID string `json:"id"`
URL string `json:"url"`
FileName string `json:"fileName"`
Extension string `json:"extension"`
Main bool `json:"main"`
ProcessedFiles []struct {
URL string `json:"url"`
Height int `json:"height"`
Width int `json:"width"`
} `json:"processedFiles"`
CropInfo struct {
User struct {
WidthPct float64 `json:"width_pct"`
XOffsetPct float64 `json:"x_offset_pct"`
HeightPct float64 `json:"height_pct"`
YOffsetPct float64 `json:"y_offset_pct"`
} `json:"user"`
ProcessedByBullseye bool `json:"processed_by_bullseye"`
UserCustomized bool `json:"user_customized"`
} `json:"crop_info"`
}
// InstagramPhoto represents a photo from Instagram
type InstagramPhoto struct {
Image string `json:"image"`
Thumbnail string `json:"thumbnail"`
Ts string `json:"ts"`
Link string `json:"link"`
}
// Error represents an API error
type Error struct {
Message string `json:"message"`
}