34 lines
941 B
TypeScript
34 lines
941 B
TypeScript
const getApiBaseUrl = (): string => {
|
|
if (__DEV__) {
|
|
return process.env.EXPO_PUBLIC_API_BASE_URL || "http://192.168.1.111:8000";
|
|
}
|
|
|
|
return (
|
|
process.env.EXPO_PUBLIC_API_BASE_URL || "https://football.ambigrat.com/"
|
|
);
|
|
};
|
|
|
|
export const API_CONFIG = {
|
|
BASE_URL: getApiBaseUrl(),
|
|
TIMEOUT: 10000,
|
|
};
|
|
|
|
export const API_ENDPOINTS = {
|
|
SPORTS: "/v1/api/sports",
|
|
COUNTRIES: "/v1/api/countries",
|
|
LEAGUES: "/v1/api/leagues",
|
|
MATCHES_TODAY: "/v1/api/matches/today",
|
|
LIVESCORE: "/v1/api/livescore",
|
|
UPCOMING_MATCHES: "/v1/api/matches/upcoming",
|
|
MATCH_DETAIL: (id: string) => `/v1/api/matches/${id}`,
|
|
ODDS: "/v1/api/odds",
|
|
SEARCH: "/v1/api/search",
|
|
H2H: "/v1/api/h2h",
|
|
FAVORITES: "/v1/api/favorites",
|
|
CHECK_FAVORITE: "/v1/api/favorites/check",
|
|
APPLE_SIGNIN: "/v1/api/auth/apple-signin",
|
|
LOGOUT: "/v1/api/auth/logout",
|
|
REFRESH_TOKEN: "/v1/api/auth/refresh-token",
|
|
USER_PROFILE: "/v1/api/user/profile",
|
|
};
|