faqieh 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/LICENSE +21 -0
  4. data/README.md +173 -0
  5. data/Rakefile +10 -0
  6. data/docs/Channel.md +50 -0
  7. data/docs/ChannelsApi.md +155 -0
  8. data/docs/DownloadTranscript202Response.md +18 -0
  9. data/docs/DownloadUrls.md +22 -0
  10. data/docs/Error.md +18 -0
  11. data/docs/ErrorError.md +24 -0
  12. data/docs/FacetOption.md +22 -0
  13. data/docs/GetChannel200Response.md +18 -0
  14. data/docs/GetMedium200Response.md +18 -0
  15. data/docs/GetPlaylist200Response.md +18 -0
  16. data/docs/GetSpeaker200Response.md +18 -0
  17. data/docs/GetTranscript200Response.md +20 -0
  18. data/docs/ListChannels200Response.md +20 -0
  19. data/docs/ListMedia200Response.md +20 -0
  20. data/docs/ListPlaylists200Response.md +20 -0
  21. data/docs/ListSpeakers200Response.md +20 -0
  22. data/docs/ListTranscripts200Response.md +18 -0
  23. data/docs/MediaApi.md +161 -0
  24. data/docs/Medium.md +64 -0
  25. data/docs/Pagination.md +28 -0
  26. data/docs/Platform.md +15 -0
  27. data/docs/Playlist.md +54 -0
  28. data/docs/PlaylistsApi.md +159 -0
  29. data/docs/Search200Response.md +20 -0
  30. data/docs/SearchApi.md +96 -0
  31. data/docs/SearchSection.md +22 -0
  32. data/docs/SearchSectionFacets.md +22 -0
  33. data/docs/Speaker.md +40 -0
  34. data/docs/SpeakerCountriesInner.md +20 -0
  35. data/docs/SpeakersApi.md +155 -0
  36. data/docs/TranscriptDetail.md +28 -0
  37. data/docs/TranscriptSearchResult.md +42 -0
  38. data/docs/TranscriptSegment.md +30 -0
  39. data/docs/TranscriptSummary.md +24 -0
  40. data/docs/TranscriptsApi.md +222 -0
  41. data/faqieh.gemspec +41 -0
  42. data/lib/faqieh/api/channels_api.rb +192 -0
  43. data/lib/faqieh/api/media_api.rb +200 -0
  44. data/lib/faqieh/api/playlists_api.rb +198 -0
  45. data/lib/faqieh/api/search_api.rb +159 -0
  46. data/lib/faqieh/api/speakers_api.rb +192 -0
  47. data/lib/faqieh/api/transcripts_api.rb +280 -0
  48. data/lib/faqieh/api_client.rb +441 -0
  49. data/lib/faqieh/api_error.rb +58 -0
  50. data/lib/faqieh/api_model_base.rb +88 -0
  51. data/lib/faqieh/configuration.rb +385 -0
  52. data/lib/faqieh/models/channel.rb +340 -0
  53. data/lib/faqieh/models/download_transcript202_response.rb +188 -0
  54. data/lib/faqieh/models/download_urls.rb +216 -0
  55. data/lib/faqieh/models/error.rb +164 -0
  56. data/lib/faqieh/models/error_error.rb +243 -0
  57. data/lib/faqieh/models/facet_option.rb +216 -0
  58. data/lib/faqieh/models/get_channel200_response.rb +164 -0
  59. data/lib/faqieh/models/get_medium200_response.rb +164 -0
  60. data/lib/faqieh/models/get_playlist200_response.rb +164 -0
  61. data/lib/faqieh/models/get_speaker200_response.rb +164 -0
  62. data/lib/faqieh/models/get_transcript200_response.rb +173 -0
  63. data/lib/faqieh/models/list_channels200_response.rb +192 -0
  64. data/lib/faqieh/models/list_media200_response.rb +192 -0
  65. data/lib/faqieh/models/list_playlists200_response.rb +192 -0
  66. data/lib/faqieh/models/list_speakers200_response.rb +192 -0
  67. data/lib/faqieh/models/list_transcripts200_response.rb +166 -0
  68. data/lib/faqieh/models/medium.rb +412 -0
  69. data/lib/faqieh/models/pagination.rb +195 -0
  70. data/lib/faqieh/models/platform.rb +40 -0
  71. data/lib/faqieh/models/playlist.rb +361 -0
  72. data/lib/faqieh/models/search200_response.rb +192 -0
  73. data/lib/faqieh/models/search_section.rb +187 -0
  74. data/lib/faqieh/models/search_section_facets.rb +243 -0
  75. data/lib/faqieh/models/speaker.rb +275 -0
  76. data/lib/faqieh/models/speaker_countries_inner.rb +202 -0
  77. data/lib/faqieh/models/transcript_detail.rb +297 -0
  78. data/lib/faqieh/models/transcript_search_result.rb +396 -0
  79. data/lib/faqieh/models/transcript_segment.rb +222 -0
  80. data/lib/faqieh/models/transcript_summary.rb +226 -0
  81. data/lib/faqieh/version.rb +15 -0
  82. data/lib/faqieh.rb +75 -0
  83. data/spec/spec_helper.rb +111 -0
  84. metadata +191 -0
@@ -0,0 +1,22 @@
1
+ # Faqieh::SearchSectionFacets
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **speakers** | [**Array<FacetOption>**](FacetOption.md) | | |
8
+ | **playlists** | [**Array<FacetOption>**](FacetOption.md) | | [optional] |
9
+ | **channels** | [**Array<FacetOption>**](FacetOption.md) | | |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'faqieh'
15
+
16
+ instance = Faqieh::SearchSectionFacets.new(
17
+ speakers: null,
18
+ playlists: null,
19
+ channels: null
20
+ )
21
+ ```
22
+
data/docs/Speaker.md ADDED
@@ -0,0 +1,40 @@
1
+ # Faqieh::Speaker
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **id** | **Integer** | | |
8
+ | **name** | **String** | | [optional] |
9
+ | **bio** | **String** | | [optional] |
10
+ | **url** | **String** | Localized Faqieh webpage URL for this speaker. | [optional] |
11
+ | **countries** | [**Array<SpeakerCountriesInner>**](SpeakerCountriesInner.md) | Country codes and localized names, ordered by ISO code. Names follow the response locale. An empty array means unassigned. | [optional] |
12
+ | **channels_count** | **Integer** | | [optional] |
13
+ | **media_count** | **Integer** | | [optional] |
14
+ | **playlists_count** | **Integer** | | [optional] |
15
+ | **hours_count** | **Integer** | | [optional] |
16
+ | **social_links** | **Hash<String, String>** | | [optional] |
17
+ | **image_urls** | **Hash<String, String>** | | [optional] |
18
+ | **channels** | [**Array<Channel>**](Channel.md) | | [optional] |
19
+
20
+ ## Example
21
+
22
+ ```ruby
23
+ require 'faqieh'
24
+
25
+ instance = Faqieh::Speaker.new(
26
+ id: null,
27
+ name: null,
28
+ bio: null,
29
+ url: null,
30
+ countries: null,
31
+ channels_count: null,
32
+ media_count: null,
33
+ playlists_count: null,
34
+ hours_count: null,
35
+ social_links: null,
36
+ image_urls: null,
37
+ channels: null
38
+ )
39
+ ```
40
+
@@ -0,0 +1,20 @@
1
+ # Faqieh::SpeakerCountriesInner
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **code** | **String** | ISO 3166-1 alpha-2 code. | |
8
+ | **name** | **String** | | |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'faqieh'
14
+
15
+ instance = Faqieh::SpeakerCountriesInner.new(
16
+ code: null,
17
+ name: null
18
+ )
19
+ ```
20
+
@@ -0,0 +1,155 @@
1
+ # Faqieh::SpeakersApi
2
+
3
+ All URIs are relative to *https://faqieh.com/api/v1*
4
+
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
7
+ | [**get_speaker**](SpeakersApi.md#get_speaker) | **GET** /speakers/{id} | Get a speaker |
8
+ | [**list_speakers**](SpeakersApi.md#list_speakers) | **GET** /speakers | List speakers |
9
+
10
+
11
+ ## get_speaker
12
+
13
+ > <GetSpeaker200Response> get_speaker(id, opts)
14
+
15
+ Get a speaker
16
+
17
+ ### Examples
18
+
19
+ ```ruby
20
+ require 'time'
21
+ require 'faqieh'
22
+
23
+ api_instance = Faqieh::SpeakersApi.new
24
+ id = 789 # Integer |
25
+ opts = {
26
+ fields: 'fields_example', # String | Comma-separated attribute whitelist; `id` is always included.
27
+ embed: 'embed_example', # String | Comma-separated associations to inline (e.g. `speakers,channels`).
28
+ locale: 'ar' # String |
29
+ }
30
+
31
+ begin
32
+ # Get a speaker
33
+ result = api_instance.get_speaker(id, opts)
34
+ p result
35
+ rescue Faqieh::ApiError => e
36
+ puts "Error when calling SpeakersApi->get_speaker: #{e}"
37
+ end
38
+ ```
39
+
40
+ #### Using the get_speaker_with_http_info variant
41
+
42
+ This returns an Array which contains the response data, status code and headers.
43
+
44
+ > <Array(<GetSpeaker200Response>, Integer, Hash)> get_speaker_with_http_info(id, opts)
45
+
46
+ ```ruby
47
+ begin
48
+ # Get a speaker
49
+ data, status_code, headers = api_instance.get_speaker_with_http_info(id, opts)
50
+ p status_code # => 2xx
51
+ p headers # => { ... }
52
+ p data # => <GetSpeaker200Response>
53
+ rescue Faqieh::ApiError => e
54
+ puts "Error when calling SpeakersApi->get_speaker_with_http_info: #{e}"
55
+ end
56
+ ```
57
+
58
+ ### Parameters
59
+
60
+ | Name | Type | Description | Notes |
61
+ | ---- | ---- | ----------- | ----- |
62
+ | **id** | **Integer** | | |
63
+ | **fields** | **String** | Comma-separated attribute whitelist; &#x60;id&#x60; is always included. | [optional] |
64
+ | **embed** | **String** | Comma-separated associations to inline (e.g. &#x60;speakers,channels&#x60;). | [optional] |
65
+ | **locale** | **String** | | [optional] |
66
+
67
+ ### Return type
68
+
69
+ [**GetSpeaker200Response**](GetSpeaker200Response.md)
70
+
71
+ ### Authorization
72
+
73
+ No authorization required
74
+
75
+ ### HTTP request headers
76
+
77
+ - **Content-Type**: Not defined
78
+ - **Accept**: application/json
79
+
80
+
81
+ ## list_speakers
82
+
83
+ > <ListSpeakers200Response> list_speakers(opts)
84
+
85
+ List speakers
86
+
87
+ ### Examples
88
+
89
+ ```ruby
90
+ require 'time'
91
+ require 'faqieh'
92
+
93
+ api_instance = Faqieh::SpeakersApi.new
94
+ opts = {
95
+ q: 'q_example', # String | Full-text query (minimum 3 searchable characters, maximum 500 characters including whitespace).
96
+ page: 789, # Integer | Page number. Search-mode requests (with `q`) are clamped to page 100; `current_page` in the response reflects the served page.
97
+ per_page: 789, # Integer |
98
+ fields: 'fields_example', # String | Comma-separated attribute whitelist; `id` is always included.
99
+ embed: 'embed_example', # String | Comma-separated associations to inline (e.g. `speakers,channels`).
100
+ locale: 'ar', # String |
101
+ include_empty: true # Boolean | Include speakers, channels, and playlists with no linked media. By default only records with media_count greater than zero are listed.
102
+ }
103
+
104
+ begin
105
+ # List speakers
106
+ result = api_instance.list_speakers(opts)
107
+ p result
108
+ rescue Faqieh::ApiError => e
109
+ puts "Error when calling SpeakersApi->list_speakers: #{e}"
110
+ end
111
+ ```
112
+
113
+ #### Using the list_speakers_with_http_info variant
114
+
115
+ This returns an Array which contains the response data, status code and headers.
116
+
117
+ > <Array(<ListSpeakers200Response>, Integer, Hash)> list_speakers_with_http_info(opts)
118
+
119
+ ```ruby
120
+ begin
121
+ # List speakers
122
+ data, status_code, headers = api_instance.list_speakers_with_http_info(opts)
123
+ p status_code # => 2xx
124
+ p headers # => { ... }
125
+ p data # => <ListSpeakers200Response>
126
+ rescue Faqieh::ApiError => e
127
+ puts "Error when calling SpeakersApi->list_speakers_with_http_info: #{e}"
128
+ end
129
+ ```
130
+
131
+ ### Parameters
132
+
133
+ | Name | Type | Description | Notes |
134
+ | ---- | ---- | ----------- | ----- |
135
+ | **q** | **String** | Full-text query (minimum 3 searchable characters, maximum 500 characters including whitespace). | [optional] |
136
+ | **page** | **Integer** | Page number. Search-mode requests (with &#x60;q&#x60;) are clamped to page 100; &#x60;current_page&#x60; in the response reflects the served page. | [optional] |
137
+ | **per_page** | **Integer** | | [optional][default to 10] |
138
+ | **fields** | **String** | Comma-separated attribute whitelist; &#x60;id&#x60; is always included. | [optional] |
139
+ | **embed** | **String** | Comma-separated associations to inline (e.g. &#x60;speakers,channels&#x60;). | [optional] |
140
+ | **locale** | **String** | | [optional] |
141
+ | **include_empty** | **Boolean** | Include speakers, channels, and playlists with no linked media. By default only records with media_count greater than zero are listed. | [optional] |
142
+
143
+ ### Return type
144
+
145
+ [**ListSpeakers200Response**](ListSpeakers200Response.md)
146
+
147
+ ### Authorization
148
+
149
+ No authorization required
150
+
151
+ ### HTTP request headers
152
+
153
+ - **Content-Type**: Not defined
154
+ - **Accept**: application/json
155
+
@@ -0,0 +1,28 @@
1
+ # Faqieh::TranscriptDetail
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **language** | **String** | | |
8
+ | **medium_id** | **Integer** | | |
9
+ | **url** | **String** | Localized Faqieh webpage URL for the recording containing this transcript. | |
10
+ | **segments_count** | **Integer** | | |
11
+ | **download_urls** | [**DownloadUrls**](DownloadUrls.md) | | |
12
+ | **segments** | [**Array&lt;TranscriptSegment&gt;**](TranscriptSegment.md) | | |
13
+
14
+ ## Example
15
+
16
+ ```ruby
17
+ require 'faqieh'
18
+
19
+ instance = Faqieh::TranscriptDetail.new(
20
+ language: null,
21
+ medium_id: null,
22
+ url: null,
23
+ segments_count: null,
24
+ download_urls: null,
25
+ segments: null
26
+ )
27
+ ```
28
+
@@ -0,0 +1,42 @@
1
+ # Faqieh::TranscriptSearchResult
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **id** | **Integer** | | |
8
+ | **url** | **String** | Localized Faqieh webpage URL with t set to the segment&#39;s start time in seconds. | |
9
+ | **content** | **String** | | [optional] |
10
+ | **highlighted_content** | **String** | Content with &#x60;&lt;mark&gt;&#x60; tags around query matches, as rendered by the web UI. Null when the segment is not part of a search result (for example plain transcript listings). | [optional] |
11
+ | **start_time** | **Float** | | [optional] |
12
+ | **end_time** | **Float** | | [optional] |
13
+ | **formatted_timestamp** | **String** | | [optional] |
14
+ | **transcript_id** | **Integer** | | |
15
+ | **language** | **String** | | |
16
+ | **medium_id** | **Integer** | | |
17
+ | **medium_title** | **String** | | |
18
+ | **medium_url** | **String** | | |
19
+ | **transcript_url** | **String** | | |
20
+
21
+ ## Example
22
+
23
+ ```ruby
24
+ require 'faqieh'
25
+
26
+ instance = Faqieh::TranscriptSearchResult.new(
27
+ id: null,
28
+ url: null,
29
+ content: null,
30
+ highlighted_content: null,
31
+ start_time: null,
32
+ end_time: null,
33
+ formatted_timestamp: null,
34
+ transcript_id: null,
35
+ language: null,
36
+ medium_id: null,
37
+ medium_title: null,
38
+ medium_url: null,
39
+ transcript_url: null
40
+ )
41
+ ```
42
+
@@ -0,0 +1,30 @@
1
+ # Faqieh::TranscriptSegment
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **id** | **Integer** | | |
8
+ | **url** | **String** | Localized Faqieh webpage URL with t set to the segment&#39;s start time in seconds. | [optional] |
9
+ | **content** | **String** | | [optional] |
10
+ | **highlighted_content** | **String** | Content with &#x60;&lt;mark&gt;&#x60; tags around query matches, as rendered by the web UI. Null when the segment is not part of a search result (for example plain transcript listings). | [optional] |
11
+ | **start_time** | **Float** | | [optional] |
12
+ | **end_time** | **Float** | | [optional] |
13
+ | **formatted_timestamp** | **String** | | [optional] |
14
+
15
+ ## Example
16
+
17
+ ```ruby
18
+ require 'faqieh'
19
+
20
+ instance = Faqieh::TranscriptSegment.new(
21
+ id: null,
22
+ url: null,
23
+ content: null,
24
+ highlighted_content: null,
25
+ start_time: null,
26
+ end_time: null,
27
+ formatted_timestamp: null
28
+ )
29
+ ```
30
+
@@ -0,0 +1,24 @@
1
+ # Faqieh::TranscriptSummary
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **language** | **String** | | |
8
+ | **url** | **String** | Localized Faqieh webpage URL for the recording containing this transcript. | |
9
+ | **segments_count** | **Integer** | | [optional] |
10
+ | **download_urls** | [**DownloadUrls**](DownloadUrls.md) | | |
11
+
12
+ ## Example
13
+
14
+ ```ruby
15
+ require 'faqieh'
16
+
17
+ instance = Faqieh::TranscriptSummary.new(
18
+ language: null,
19
+ url: null,
20
+ segments_count: null,
21
+ download_urls: null
22
+ )
23
+ ```
24
+
@@ -0,0 +1,222 @@
1
+ # Faqieh::TranscriptsApi
2
+
3
+ All URIs are relative to *https://faqieh.com/api/v1*
4
+
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
7
+ | [**download_transcript**](TranscriptsApi.md#download_transcript) | **GET** /media/{medium_id}/transcripts/{language}/download.{format} | Download a transcript as text, SRT, or PDF |
8
+ | [**get_transcript**](TranscriptsApi.md#get_transcript) | **GET** /media/{medium_id}/transcripts/{language} | Get a transcript with its segments |
9
+ | [**list_transcripts**](TranscriptsApi.md#list_transcripts) | **GET** /media/{medium_id}/transcripts | List a medium&#39;s transcripts |
10
+
11
+
12
+ ## download_transcript
13
+
14
+ > File download_transcript(medium_id, language, format)
15
+
16
+ Download a transcript as text, SRT, or PDF
17
+
18
+ Text and SRT are generated on the fly. The PDF is rendered asynchronously and cached: when it is not yet ready the endpoint returns `202 Accepted` with a `preparing` status and `Retry-After: 15`. Wait at least 15 seconds before polling. All formats share the 10/minute export allowance with full transcript JSON responses.
19
+
20
+ ### Examples
21
+
22
+ ```ruby
23
+ require 'time'
24
+ require 'faqieh'
25
+
26
+ api_instance = Faqieh::TranscriptsApi.new
27
+ medium_id = 789 # Integer |
28
+ language = 'language_example' # String | Two-letter language code (e.g. `ar`, `en`).
29
+ format = 'txt' # String | File format.
30
+
31
+ begin
32
+ # Download a transcript as text, SRT, or PDF
33
+ result = api_instance.download_transcript(medium_id, language, format)
34
+ p result
35
+ rescue Faqieh::ApiError => e
36
+ puts "Error when calling TranscriptsApi->download_transcript: #{e}"
37
+ end
38
+ ```
39
+
40
+ #### Using the download_transcript_with_http_info variant
41
+
42
+ This returns an Array which contains the response data, status code and headers.
43
+
44
+ > <Array(File, Integer, Hash)> download_transcript_with_http_info(medium_id, language, format)
45
+
46
+ ```ruby
47
+ begin
48
+ # Download a transcript as text, SRT, or PDF
49
+ data, status_code, headers = api_instance.download_transcript_with_http_info(medium_id, language, format)
50
+ p status_code # => 2xx
51
+ p headers # => { ... }
52
+ p data # => File
53
+ rescue Faqieh::ApiError => e
54
+ puts "Error when calling TranscriptsApi->download_transcript_with_http_info: #{e}"
55
+ end
56
+ ```
57
+
58
+ ### Parameters
59
+
60
+ | Name | Type | Description | Notes |
61
+ | ---- | ---- | ----------- | ----- |
62
+ | **medium_id** | **Integer** | | |
63
+ | **language** | **String** | Two-letter language code (e.g. &#x60;ar&#x60;, &#x60;en&#x60;). | |
64
+ | **format** | **String** | File format. | |
65
+
66
+ ### Return type
67
+
68
+ **File**
69
+
70
+ ### Authorization
71
+
72
+ No authorization required
73
+
74
+ ### HTTP request headers
75
+
76
+ - **Content-Type**: Not defined
77
+ - **Accept**: text/plain, application/pdf, application/json
78
+
79
+
80
+ ## get_transcript
81
+
82
+ > <GetTranscript200Response> get_transcript(medium_id, language, opts)
83
+
84
+ Get a transcript with its segments
85
+
86
+ Segments are paginated by default. Pass `?full=true` to return every segment inline (no `pagination`), or `?q=` to search within the transcript (returns a cursor-style `pagination.next_page`).
87
+
88
+ ### Examples
89
+
90
+ ```ruby
91
+ require 'time'
92
+ require 'faqieh'
93
+
94
+ api_instance = Faqieh::TranscriptsApi.new
95
+ medium_id = 789 # Integer |
96
+ language = 'language_example' # String | Two-letter language code (e.g. `ar`, `en`).
97
+ opts = {
98
+ q: 'q_example', # String | Full-text query (minimum 3 searchable characters, maximum 500 characters including whitespace).
99
+ page: 789, # Integer | Page number. Search-mode requests (with `q`) are clamped to page 100; `current_page` in the response reflects the served page.
100
+ per_page: 789, # Integer |
101
+ fields: 'fields_example', # String | Comma-separated attribute whitelist; `id` is always included.
102
+ full: true # Boolean | Return all segments inline without pagination.
103
+ }
104
+
105
+ begin
106
+ # Get a transcript with its segments
107
+ result = api_instance.get_transcript(medium_id, language, opts)
108
+ p result
109
+ rescue Faqieh::ApiError => e
110
+ puts "Error when calling TranscriptsApi->get_transcript: #{e}"
111
+ end
112
+ ```
113
+
114
+ #### Using the get_transcript_with_http_info variant
115
+
116
+ This returns an Array which contains the response data, status code and headers.
117
+
118
+ > <Array(<GetTranscript200Response>, Integer, Hash)> get_transcript_with_http_info(medium_id, language, opts)
119
+
120
+ ```ruby
121
+ begin
122
+ # Get a transcript with its segments
123
+ data, status_code, headers = api_instance.get_transcript_with_http_info(medium_id, language, opts)
124
+ p status_code # => 2xx
125
+ p headers # => { ... }
126
+ p data # => <GetTranscript200Response>
127
+ rescue Faqieh::ApiError => e
128
+ puts "Error when calling TranscriptsApi->get_transcript_with_http_info: #{e}"
129
+ end
130
+ ```
131
+
132
+ ### Parameters
133
+
134
+ | Name | Type | Description | Notes |
135
+ | ---- | ---- | ----------- | ----- |
136
+ | **medium_id** | **Integer** | | |
137
+ | **language** | **String** | Two-letter language code (e.g. &#x60;ar&#x60;, &#x60;en&#x60;). | |
138
+ | **q** | **String** | Full-text query (minimum 3 searchable characters, maximum 500 characters including whitespace). | [optional] |
139
+ | **page** | **Integer** | Page number. Search-mode requests (with &#x60;q&#x60;) are clamped to page 100; &#x60;current_page&#x60; in the response reflects the served page. | [optional] |
140
+ | **per_page** | **Integer** | | [optional][default to 10] |
141
+ | **fields** | **String** | Comma-separated attribute whitelist; &#x60;id&#x60; is always included. | [optional] |
142
+ | **full** | **Boolean** | Return all segments inline without pagination. | [optional] |
143
+
144
+ ### Return type
145
+
146
+ [**GetTranscript200Response**](GetTranscript200Response.md)
147
+
148
+ ### Authorization
149
+
150
+ No authorization required
151
+
152
+ ### HTTP request headers
153
+
154
+ - **Content-Type**: Not defined
155
+ - **Accept**: application/json
156
+
157
+
158
+ ## list_transcripts
159
+
160
+ > <ListTranscripts200Response> list_transcripts(medium_id, opts)
161
+
162
+ List a medium's transcripts
163
+
164
+ ### Examples
165
+
166
+ ```ruby
167
+ require 'time'
168
+ require 'faqieh'
169
+
170
+ api_instance = Faqieh::TranscriptsApi.new
171
+ medium_id = 789 # Integer |
172
+ opts = {
173
+ locale: 'ar' # String |
174
+ }
175
+
176
+ begin
177
+ # List a medium's transcripts
178
+ result = api_instance.list_transcripts(medium_id, opts)
179
+ p result
180
+ rescue Faqieh::ApiError => e
181
+ puts "Error when calling TranscriptsApi->list_transcripts: #{e}"
182
+ end
183
+ ```
184
+
185
+ #### Using the list_transcripts_with_http_info variant
186
+
187
+ This returns an Array which contains the response data, status code and headers.
188
+
189
+ > <Array(<ListTranscripts200Response>, Integer, Hash)> list_transcripts_with_http_info(medium_id, opts)
190
+
191
+ ```ruby
192
+ begin
193
+ # List a medium's transcripts
194
+ data, status_code, headers = api_instance.list_transcripts_with_http_info(medium_id, opts)
195
+ p status_code # => 2xx
196
+ p headers # => { ... }
197
+ p data # => <ListTranscripts200Response>
198
+ rescue Faqieh::ApiError => e
199
+ puts "Error when calling TranscriptsApi->list_transcripts_with_http_info: #{e}"
200
+ end
201
+ ```
202
+
203
+ ### Parameters
204
+
205
+ | Name | Type | Description | Notes |
206
+ | ---- | ---- | ----------- | ----- |
207
+ | **medium_id** | **Integer** | | |
208
+ | **locale** | **String** | | [optional] |
209
+
210
+ ### Return type
211
+
212
+ [**ListTranscripts200Response**](ListTranscripts200Response.md)
213
+
214
+ ### Authorization
215
+
216
+ No authorization required
217
+
218
+ ### HTTP request headers
219
+
220
+ - **Content-Type**: Not defined
221
+ - **Accept**: application/json
222
+
data/faqieh.gemspec ADDED
@@ -0,0 +1,41 @@
1
+ # -*- encoding: utf-8 -*-
2
+
3
+ =begin
4
+ #Faqieh Public API
5
+
6
+ #Public, read-only JSON API for browsing Faqieh's catalog of speakers, channels, playlists, media, and transcripts. Resource responses are JSON wrapped in a `{ \"data\": ... }` envelope. Collections additionally include a `pagination` object and RFC 5988 `Link` headers. Transcript downloads return files, errors use an `{ \"error\": ... }` envelope, and a PDF that is still being prepared returns a JSON `status` object. No authentication is required. Requests are rate limited per IP address: 300 per minute per controller (list/detail share an allowance), with these additional operation limits: - 60 searches per minute, shared across `/search`, catalog `q` searches, transcript searches and the equivalent MCP tools. - 60 paginated transcript reads per minute, shared with MCP `get_transcript`. - 10 exports per minute, shared across `full=true` and TXT/SRT/PDF downloads, regardless of media ID, language or format. With `q`, transcript search takes precedence over `full=true` and uses the search/read allowances. Rate-limit responses include `Retry-After: 60`. ## Conventions - **Pagination:** `?page=` and `?per_page=` (max 100). Search-mode requests (any request with `q`) serve at most 100 pages: deeper `page` values are clamped to 100, and `next_page` / `Link rel=\"next\"` stop at that boundary. Iterate with `next_page` or the `Link` header rather than a self-incremented counter. - **Search:** `?q=` (minimum 3 characters) on each collection, plus the cross-type `/search` endpoint. - **Partial response:** `?fields=a,b` returns only the listed attributes (`id` is always included). - **Embedding:** `?embed=speakers,channels` inlines related resources. - **Resource URLs:** `url` links to the localized Faqieh webpage for speakers, channels, playlists, and media. Channels, playlists, and media also expose `source_url` for the original source; it equals `url` when `platform` is `faqieh`. Clients that used `url` for the source should use `source_url`. Transcript summaries and details include the recording's webpage `url`; transcript segments and transcript search hits include a timestamped `url` pointing to the recording at the segment's start time. - **Localization:** `?locale=ar|en` or the `Accept-Language` header (default `ar`); affects labels and webpage URLs, not search relevance.
7
+
8
+ The version of the OpenAPI document: 1.0.0
9
+
10
+ Generated by: https://openapi-generator.tech
11
+ Generator version: 7.25.0
12
+
13
+ =end
14
+
15
+ $:.push File.expand_path("../lib", __FILE__)
16
+ require "faqieh/version"
17
+
18
+ Gem::Specification.new do |s|
19
+ s.name = "faqieh"
20
+ s.version = Faqieh::VERSION
21
+ s.platform = Gem::Platform::RUBY
22
+ s.authors = ["iEasyBooks"]
23
+ s.email = [""]
24
+ s.homepage = "https://faqieh.com"
25
+ s.summary = "Client for the Faqieh public API"
26
+ s.description = "Generated client for the Faqieh public API."
27
+ s.license = "MIT"
28
+ s.required_ruby_version = ">= 3.1"
29
+ s.metadata = {}
30
+
31
+ s.add_runtime_dependency 'faraday', '>= 1.0.1', '< 3.0'
32
+ s.add_runtime_dependency 'faraday-multipart'
33
+ s.add_runtime_dependency 'marcel'
34
+
35
+ s.add_development_dependency 'rspec', '~> 3.6', '>= 3.6.0'
36
+
37
+ s.files = `find *`.split("\n").uniq.sort.select { |f| !f.empty? }
38
+ s.test_files = `find spec/*`.split("\n")
39
+ s.executables = []
40
+ s.require_paths = ["lib"]
41
+ end