Documentation ¶
Index ¶
- Constants
- type ErrorDTO
- type GetUsersDTO
- type Jellyseerr
- func (js *Jellyseerr) ApplyNotificationsTemplateToUser(jfID string, tmpl NotificationsTemplate) error
- func (js *Jellyseerr) ApplyTemplateToUser(jfID string, tmpl UserTemplate) error
- func (js *Jellyseerr) DeleteUser(jfID string) error
- func (js *Jellyseerr) GetExistingUser(jfID string) (u User, err error)
- func (js *Jellyseerr) GetNotificationPreferences(jfID string) (Notifications, error)
- func (js *Jellyseerr) GetNotificationPreferencesByID(jellyseerrID int64) (Notifications, error)
- func (js *Jellyseerr) GetOrImportUser(jfID string) (u User, imported bool, err error)
- func (js *Jellyseerr) GetPermissions(jfID string) (Permissions, error)
- func (js *Jellyseerr) GetUsers() (map[string]User, error)
- func (js *Jellyseerr) ImportFromJellyfin(jfIDs ...string) ([]User, error)
- func (js *Jellyseerr) Me() (User, error)
- func (js *Jellyseerr) ModifyMainUserSettings(jfID string, conf MainUserSettings) error
- func (js *Jellyseerr) ModifyNotifications(jfID string, conf map[NotificationsField]any) error
- func (js *Jellyseerr) ModifyUser(jfID string, conf map[UserField]any) error
- func (js *Jellyseerr) MustGetUser(jfID string) (User, error)
- func (js *Jellyseerr) SetPermissions(jfID string, perm Permissions) error
- func (js *Jellyseerr) SetTransport(t *http.Transport)
- func (js *Jellyseerr) UserByID(jellyseerrID int64) (User, error)
- type MainUserSettings
- type NotificationTypes
- type Notifications
- type NotificationsField
- type NotificationsTemplate
- type PageInfo
- type Permissions
- type User
- type UserField
- type UserTemplate
Constants ¶
View Source
const ( API_SUFFIX = "/api/v1" BogusIdentifier = "123412341234123456" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GetUsersDTO ¶
type Jellyseerr ¶
type Jellyseerr struct { LogRequestBodies bool AutoImportUsers bool // contains filtered or unexported fields }
Jellyseerr represents a running Jellyseerr instance.
func NewJellyseerr ¶
func NewJellyseerr(server, key string, timeoutHandler co.TimeoutHandler) *Jellyseerr
NewJellyseerr returns an Ombi object.
func (*Jellyseerr) ApplyNotificationsTemplateToUser ¶
func (js *Jellyseerr) ApplyNotificationsTemplateToUser(jfID string, tmpl NotificationsTemplate) error
func (*Jellyseerr) ApplyTemplateToUser ¶
func (js *Jellyseerr) ApplyTemplateToUser(jfID string, tmpl UserTemplate) error
func (*Jellyseerr) DeleteUser ¶
func (js *Jellyseerr) DeleteUser(jfID string) error
func (*Jellyseerr) GetExistingUser ¶
func (js *Jellyseerr) GetExistingUser(jfID string) (u User, err error)
func (*Jellyseerr) GetNotificationPreferences ¶
func (js *Jellyseerr) GetNotificationPreferences(jfID string) (Notifications, error)
func (*Jellyseerr) GetNotificationPreferencesByID ¶
func (js *Jellyseerr) GetNotificationPreferencesByID(jellyseerrID int64) (Notifications, error)
func (*Jellyseerr) GetOrImportUser ¶
func (js *Jellyseerr) GetOrImportUser(jfID string) (u User, imported bool, err error)
GetImportedUser provides the same function as ImportFromJellyfin, but will always return the user, even if they already existed. Also returns whether the user was imported or not,
func (*Jellyseerr) GetPermissions ¶
func (js *Jellyseerr) GetPermissions(jfID string) (Permissions, error)
func (*Jellyseerr) ImportFromJellyfin ¶
func (js *Jellyseerr) ImportFromJellyfin(jfIDs ...string) ([]User, error)
func (*Jellyseerr) Me ¶
func (js *Jellyseerr) Me() (User, error)
func (*Jellyseerr) ModifyMainUserSettings ¶
func (js *Jellyseerr) ModifyMainUserSettings(jfID string, conf MainUserSettings) error
func (*Jellyseerr) ModifyNotifications ¶
func (js *Jellyseerr) ModifyNotifications(jfID string, conf map[NotificationsField]any) error
func (*Jellyseerr) ModifyUser ¶
func (js *Jellyseerr) ModifyUser(jfID string, conf map[UserField]any) error
func (*Jellyseerr) MustGetUser ¶
func (js *Jellyseerr) MustGetUser(jfID string) (User, error)
func (*Jellyseerr) SetPermissions ¶
func (js *Jellyseerr) SetPermissions(jfID string, perm Permissions) error
func (*Jellyseerr) SetTransport ¶
func (js *Jellyseerr) SetTransport(t *http.Transport)
SetTransport sets the http.Transport to use for requests. Can be used to set a proxy.
type MainUserSettings ¶
type MainUserSettings struct { Username string `json:"username,omitempty"` Email string `json:"email,omitempty"` DiscordID string `json:"discordId,omitempty"` Locale string `json:"locale,omitempty"` Region string `json:"region,omitempty"` OriginalLanguage any `json:"originalLanguage,omitempty"` MovieQuotaLimit any `json:"movieQuotaLimit,omitempty"` MovieQuotaDays any `json:"movieQuotaDays,omitempty"` TvQuotaLimit any `json:"tvQuotaLimit,omitempty"` TvQuotaDays any `json:"tvQuotaDays,omitempty"` WatchlistSyncMovies any `json:"watchlistSyncMovies,omitempty"` WatchlistSyncTv any `json:"watchlistSyncTv,omitempty"` }
type NotificationTypes ¶
type Notifications ¶
type Notifications struct { NotificationsTemplate PgpKey any `json:"pgpKey,omitempty"` DiscordID string `json:"discordId,omitempty"` PushbulletAccessToken any `json:"pushbulletAccessToken,omitempty"` PushoverApplicationToken any `json:"pushoverApplicationToken,omitempty"` PushoverUserKey any `json:"pushoverUserKey,omitempty"` TelegramChatID string `json:"telegramChatId,omitempty"` }
type NotificationsField ¶
type NotificationsField string
const ( FieldDiscord NotificationsField = "discordId" FieldTelegram NotificationsField = "telegramChatId" FieldEmailEnabled NotificationsField = "emailEnabled" FieldDiscordEnabled NotificationsField = "discordEnabled" FieldTelegramEnabled NotificationsField = "telegramEnabled" )
type NotificationsTemplate ¶
type NotificationsTemplate struct { EmailEnabled bool `json:"emailEnabled,omitempty"` DiscordEnabled bool `json:"discordEnabled,omitempty"` DiscordEnabledTypes int64 `json:"discordEnabledTypes,omitempty"` PushoverSound any `json:"pushoverSound,omitempty"` TelegramEnabled bool `json:"telegramEnabled,omitempty"` TelegramSendSilently any `json:"telegramSendSilently,omitempty"` WebPushEnabled bool `json:"webPushEnabled,omitempty"` NotifTypes NotificationTypes `json:"notificationTypes"` }
type Permissions ¶
type Permissions int
type User ¶
type User struct { UserTemplate // Note: You can set this with User.UserTemplate = value. UserType int64 `json:"userType,omitempty"` Warnings []any `json:"warnings,omitempty"` ID int64 `json:"id,omitempty"` Email string `json:"email,omitempty"` PlexUsername string `json:"plexUsername,omitempty"` JellyfinUsername string `json:"jellyfinUsername,omitempty"` Username string `json:"username,omitempty"` RecoveryLinkExpirationDate any `json:"recoveryLinkExpirationDate,omitempty"` PlexID string `json:"plexId,omitempty"` JellyfinUserID string `json:"jellyfinUserId,omitempty"` JellyfinDeviceID string `json:"jellyfinDeviceId,omitempty"` JellyfinAuthToken string `json:"jellyfinAuthToken,omitempty"` PlexToken string `json:"plexToken,omitempty"` Avatar string `json:"avatar,omitempty"` CreatedAt time.Time `json:"createdAt,omitempty"` UpdatedAt time.Time `json:"updatedAt,omitempty"` RequestCount int64 `json:"requestCount,omitempty"` DisplayName string `json:"displayName,omitempty"` }
type UserTemplate ¶
type UserTemplate struct { Permissions Permissions `json:"permissions,omitempty"` MovieQuotaLimit any `json:"movieQuotaLimit,omitempty"` MovieQuotaDays any `json:"movieQuotaDays,omitempty"` TvQuotaLimit any `json:"tvQuotaLimit,omitempty"` TvQuotaDays any `json:"tvQuotaDays,omitempty"` }
Click to show internal directories.
Click to hide internal directories.