Coverage for youversion/config.py: 100%
90 statements
« prev ^ index » next coverage.py v7.14.3, created at 2026-06-26 11:31 +0100
« prev ^ index » next coverage.py v7.14.3, created at 2026-06-26 11:31 +0100
1"""Configuration constants for YouVersion API client."""
4class Config:
5 """Configuration constants."""
7 # API Configuration
8 BASE_URL = "https://my.bible.com"
9 BIBLE_COM_BASE_URL = "https://www.bible.com"
10 VOTD_URL = "https://nodejs.bible.com/api/moments/votd/3.1"
12 # YouVersion API Base URLs
13 AUDIO_BIBLE_API_BASE = "http://audio-bible.youversionapi.com"
14 BIBLE_API_BASE = "https://bible.youversionapi.com"
15 EVENTS_API_BASE = "https://events.youversionapi.com"
16 FRIENDS_API_BASE = "https://friends.youversionapi.com"
17 FRIENDSHIPS_API_BASE = "https://friendships.youversionapi.com"
18 IMAGES_API_BASE = "https://images.youversionapi.com"
19 MOMENTS_API_BASE = "https://moments.youversionapi.com"
20 NOTIFICATIONS_API_BASE = "https://notifications.youversionapi.com"
21 SEARCH_API_BASE = "https://search.youversionapi.com"
22 SHARE_API_BASE = "https://share.youversionapi.com"
23 THEMES_API_BASE = "https://themes.youversionapi.com"
24 VIDEOS_API_BASE = "https://videos.youversionapi.com"
25 YOUVERSION_API_BASE = "https://youversionapi.com"
27 # OAuth2 Configuration
28 AUTH_URL = "https://auth.youversionapi.com/token"
29 CLIENT_ID = "ODViNjFkOTdhNzliOTZiZTQ2NWViYWVlZTgzYjEzMTM="
30 CLIENT_SECRET = "NzVjZjBlMTQxY2JmNDFlZjQxMGFkY2U1YjY1MzdhNDk="
32 # API Headers
33 DEFAULT_HEADERS = {
34 "Referer": "http://android.youversionapi.com/",
35 "X-YouVersion-App-Platform": "android",
36 "X-YouVersion-App-Version": "17114",
37 "X-YouVersion-Client": "youversion",
38 }
40 # Endpoints
41 SIGNIN_URL = "/sign-in"
43 # Bible API Endpoints
44 BIBLE_CHAPTER_URL = "/3.1/chapter.json"
45 BIBLE_CONFIGURATION_URL = "/3.1/configuration.json"
46 BIBLE_RECOMMENDED_LANGUAGES_URL = "/3.1/recommended_languages.json"
47 BIBLE_VERSION_URL = "/3.1/version.json"
48 BIBLE_VERSIONS_URL = "/3.1/versions.json"
50 # Audio Bible API Endpoints
51 AUDIO_CHAPTER_URL = "/3.1/chapter.json"
52 AUDIO_VIEW_URL = "/3.1/view.json"
54 # Friends API Endpoints
55 FRIENDS_ALL_ITEMS_URL = "/3.1/all_items.json"
56 FRIENDS_DELETE_URL = "/3.1/delete.json"
57 FRIENDS_ITEMS_URL = "/3.1/items.json"
58 FRIENDSHIPS_ACCEPT_URL = "/3.1/accept.json"
59 FRIENDSHIPS_CONTACTS_URL = "/3.1/contacts.json"
60 FRIENDSHIPS_DECLINE_URL = "/3.1/decline.json"
61 FRIENDSHIPS_DISMISS_SUGGESTION_URL = "/3.1/dismiss_suggestion.json"
62 FRIENDSHIPS_FACEBOOK_FRIENDS_URL = "/3.1/facebook_friends.json"
63 FRIENDSHIPS_INCOMING_URL = "/3.1/incoming.json"
64 FRIENDSHIPS_OFFER_URL = "/3.1/offer.json"
65 FRIENDSHIPS_SUGGESTIONS_URL = "/3.1/suggestions.json"
66 SHARE_INVITE_EMAIL_URL = "/3.1/invite_email.json"
67 SHARE_INVITE_SMS_URL = "/3.1/invite_sms.json"
69 # Events API Endpoints
70 EVENTS_CONFIGURATION_URL = "/3.2/configuration.json"
71 EVENTS_DELETE_SAVED_URL = "/3.2/delete_saved.json"
72 EVENTS_SAVE_URL = "/3.2/save.json"
73 EVENTS_SAVED_ALL_ITEMS_URL = "/3.2/saved_all_items.json"
74 EVENTS_SAVED_ITEMS_URL = "/3.2/saved_items.json"
75 EVENTS_SEARCH_URL = "/3.2/search.json"
76 EVENTS_VIEW_URL = "/3.2/view.json"
78 # Search API Endpoints
79 SEARCH_BIBLE_URL = "/3.1/bible.json"
80 SEARCH_PLANS_URL = "/3.1/plans.json"
81 SEARCH_USERS_URL = "/3.1/users.json"
82 SEARCH_VIDEOS_URL = "/3.1/videos.json"
84 # Videos API Endpoints
85 VIDEOS_VIEW_URL = "/3.1/view.json"
87 # Images API Endpoints
88 IMAGES_ITEMS_URL = "/3.1/items.json"
89 IMAGES_UPLOAD_URL = "/3.1/upload.json"
91 # Notifications API Endpoints
92 NOTIFICATIONS_ITEMS_URL = "/3.1/items.json"
93 NOTIFICATIONS_SETTINGS_URL = "/3.1/settings.json"
94 NOTIFICATIONS_UPDATE_SETTINGS_URL = "/3.1/update_settings.json"
95 NOTIFICATIONS_UPDATE_URL = "/3.1/update.json"
96 NOTIFICATIONS_UPDATE_VOTD_SETTINGS_URL = "/3.1/update_votd_settings.json"
97 NOTIFICATIONS_VOTD_SETTINGS_URL = "/3.1/votd_settings.json"
99 # Moments API Endpoints
100 MOMENTS_CLIENT_SIDE_ITEMS_URL = "/3.1/client_side_items.json"
101 MOMENTS_COLORS_URL = "/3.1/colors.json"
102 MOMENTS_CONFIGURATION_URL = "/3.1/configuration.json"
103 MOMENTS_CREATE_URL = "/3.1/create.json"
104 MOMENTS_DELETE_URL = "/3.1/delete.json"
105 MOMENTS_HIDE_VERSE_COLORS_URL = "/3.1/hide_verse_colors.json"
106 MOMENTS_ITEMS_URL = "/3.1/items.json"
107 MOMENTS_LABELS_URL = "/3.1/labels.json"
108 MOMENTS_UPDATE_URL = "/3.1/update.json"
109 MOMENTS_VERSE_COLORS_URL = "/3.1/verse_colors.json"
110 MOMENTS_VIEW_URL = "/3.1/view.json"
111 MOMENTS_VOTD_URL = "/3.1/votd.json"
113 # Comments API Endpoints
114 COMMENTS_CREATE_URL = "/3.1/comments/create.json"
115 COMMENTS_DELETE_URL = "/3.1/comments/delete.json"
117 # Likes API Endpoints
118 LIKES_CREATE_URL = "/3.1/likes/create.json"
119 LIKES_DELETE_URL = "/3.1/likes/delete.json"
121 # Messaging API Endpoints
122 MESSAGING_REGISTER_URL = "/3.1/messaging/register.json"
123 MESSAGING_UNREGISTER_URL = "/3.1/messaging/unregister.json"
125 # Themes API Endpoints
126 THEMES_ADD_URL = "/3.1/create.json"
127 THEMES_DESCRIPTION_URL = "/3.1/description.json"
128 THEMES_ITEMS_URL = "/3.1/items.json"
129 THEMES_REMOVE_URL = "/3.1/remove.json"
130 THEMES_SET_URL = "/3.1/set.json"
132 # Alternative endpoints without build ID
133 READING_PLANS_URL = "/users/{username}/reading-plans"
134 USER_PROFILE_URL = "/users/{username}"
136 # HTTP Configuration
137 HTTP_TIMEOUT = 30.0
139 # Pagination
140 DEFAULT_PAGE = 1
141 DEFAULT_LIMIT = 10