Skip to main content

Interfaces

Explore the interfaces that define the IPTV JSON structure and behavior for robust IPTV service integration, ensuring standardization and functionality across the system.

Interface Definitions

IMultiLanguageText

Defines the structure for multi-language text support, allowing content to be displayed in different languages based on user preferences.

interface IMultiLanguageText {
en?: string;
[key: string]: string | undefined;
}

IThemeColors

Defines the structure for theme colors, allowing content to be displayed in different colors based on user preferences.

interface IThemeColors {
light?: string;
dark?: string;
[key: string]: string | undefined;
}

IPaging

Provides the keys used for pagination API requests, ensuring that data fetching aligns with front-end pagination structures.

interface IPaging {
page_key: string;
size_key: string;
}

IPageInfo

Manages pagination information, crucial for structuring the display of lists and content across multiple pages.

interface IPageInfo {
current_page: number;
total: number;
per_page: number;
last_page: number;
}

IImage

IImage defines the properties required to control how images are displayed within the application.

interface IImage {
url: string;
background_color?: string;
height?: number;
width?: number;
display?: IMAGE_DISPLAY;
shape?: IMAGE_SHAPE;
padding?: number;
}

enum IMAGE_DISPLAY{
COVER = 'cover',
CONTAIN = 'contain',
}

enum IMAGE_SHAPE {
ROUND = 'round',
SQUARE = 'square',
}

INotice

INotice defines the properties required to control how notices are displayed within the application.

interface INotice {
id: string;
link?: string;
text?: string;
icon?: string;
closeable?: boolean;
}

IRequestHeaderRow

Specifies individual headers for HTTP requests, essential for configuring API calls that require authentication or specific content types.

interface IRequestHeaderRow {
key: string;
value: string;
}

IRemoteData

Facilitates the configuration for remote data fetching, enabling or disabling remote data sources and specifying request headers IRequestHeaderRow for API calls.

interface IRemoteData {
url: string;
request_headers?: Array<IRequestHeaderRow>;
external?: boolean;
security?: boolean;
encrypted?: boolean;
}

ILoadMore

Configures load more functionality, enabling robust load more capabilities including remote data IRemoteData and pagination IPaging.

interface ILoadMore {
remote_data: IRemoteData;
paging: IPaging;
pageInfo: IPageInfo;
}

ISearchConfig

Configures search functionality, enabling robust search capabilities including autosuggest, through specified endpoints.

It leverages the IPaging interface for pagination settings.

interface ISearchConfig {
url: string;
suggest_url?: string;
search_key: string;
paging: IPaging;
request_headers?: Array<IRequestHeaderRow>;
}

ISortItem

Enables sorting mechanisms within the application, allowing users to organize displayed data according to various criteria.

interface ISortItem {
type: SORT_ITEM_TYPE;
text?: string;
url?: string;
icon?: string;
value?: Array<ISortItem>;
request_headers?: Array<IRequestHeaderRow>;
}

enum SORT_ITEM_TYPE {
RADIO = 'radio',
DROPDOWN = 'dropdown',
}

ILabelData

Facilitates the organization of displayed data within the application, enabling users to sort information based on various criteria.

interface ILabelData {
position: POSITION;
text?: string | IMultiLanguageText;
icon?: string | IMultiLanguageText;
color?: string | IThemeColors;
text_color?: string | IThemeColors;
}

enum POSITION {
TOP_LEFT = 'top-left',
TOP_CENTER = 'top-center',
TOP_RIGHT = 'top-right',
CENTER_LEFT = 'center-left',
CENTER = 'center',
CENTER_RIGHT = 'center-right',
BOTTOM_LEFT = 'bottom-left',
BOTTOM_CENTER = 'bottom-center',
BOTTOM_RIGHT = 'bottom-right',
}

IBannerItem

Defines the structure for banner items in the application, supporting different banner types and configurations:

  • Visual elements via IImage interface
  • Optional remote data configuration through IRemoteData interface
  • Optional source URL via src field
interface IBannerItem {
id: string;
source: BANNER_SOURCE;
ads_id?: string;
image?: IImage;
remote_data?: IRemoteData;
}

enum BANNER_SOURCE {
admob = 'admob',
custom = 'custom',
}