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.
- checksums.yaml +7 -0
- data/Gemfile +9 -0
- data/LICENSE +21 -0
- data/README.md +173 -0
- data/Rakefile +10 -0
- data/docs/Channel.md +50 -0
- data/docs/ChannelsApi.md +155 -0
- data/docs/DownloadTranscript202Response.md +18 -0
- data/docs/DownloadUrls.md +22 -0
- data/docs/Error.md +18 -0
- data/docs/ErrorError.md +24 -0
- data/docs/FacetOption.md +22 -0
- data/docs/GetChannel200Response.md +18 -0
- data/docs/GetMedium200Response.md +18 -0
- data/docs/GetPlaylist200Response.md +18 -0
- data/docs/GetSpeaker200Response.md +18 -0
- data/docs/GetTranscript200Response.md +20 -0
- data/docs/ListChannels200Response.md +20 -0
- data/docs/ListMedia200Response.md +20 -0
- data/docs/ListPlaylists200Response.md +20 -0
- data/docs/ListSpeakers200Response.md +20 -0
- data/docs/ListTranscripts200Response.md +18 -0
- data/docs/MediaApi.md +161 -0
- data/docs/Medium.md +64 -0
- data/docs/Pagination.md +28 -0
- data/docs/Platform.md +15 -0
- data/docs/Playlist.md +54 -0
- data/docs/PlaylistsApi.md +159 -0
- data/docs/Search200Response.md +20 -0
- data/docs/SearchApi.md +96 -0
- data/docs/SearchSection.md +22 -0
- data/docs/SearchSectionFacets.md +22 -0
- data/docs/Speaker.md +40 -0
- data/docs/SpeakerCountriesInner.md +20 -0
- data/docs/SpeakersApi.md +155 -0
- data/docs/TranscriptDetail.md +28 -0
- data/docs/TranscriptSearchResult.md +42 -0
- data/docs/TranscriptSegment.md +30 -0
- data/docs/TranscriptSummary.md +24 -0
- data/docs/TranscriptsApi.md +222 -0
- data/faqieh.gemspec +41 -0
- data/lib/faqieh/api/channels_api.rb +192 -0
- data/lib/faqieh/api/media_api.rb +200 -0
- data/lib/faqieh/api/playlists_api.rb +198 -0
- data/lib/faqieh/api/search_api.rb +159 -0
- data/lib/faqieh/api/speakers_api.rb +192 -0
- data/lib/faqieh/api/transcripts_api.rb +280 -0
- data/lib/faqieh/api_client.rb +441 -0
- data/lib/faqieh/api_error.rb +58 -0
- data/lib/faqieh/api_model_base.rb +88 -0
- data/lib/faqieh/configuration.rb +385 -0
- data/lib/faqieh/models/channel.rb +340 -0
- data/lib/faqieh/models/download_transcript202_response.rb +188 -0
- data/lib/faqieh/models/download_urls.rb +216 -0
- data/lib/faqieh/models/error.rb +164 -0
- data/lib/faqieh/models/error_error.rb +243 -0
- data/lib/faqieh/models/facet_option.rb +216 -0
- data/lib/faqieh/models/get_channel200_response.rb +164 -0
- data/lib/faqieh/models/get_medium200_response.rb +164 -0
- data/lib/faqieh/models/get_playlist200_response.rb +164 -0
- data/lib/faqieh/models/get_speaker200_response.rb +164 -0
- data/lib/faqieh/models/get_transcript200_response.rb +173 -0
- data/lib/faqieh/models/list_channels200_response.rb +192 -0
- data/lib/faqieh/models/list_media200_response.rb +192 -0
- data/lib/faqieh/models/list_playlists200_response.rb +192 -0
- data/lib/faqieh/models/list_speakers200_response.rb +192 -0
- data/lib/faqieh/models/list_transcripts200_response.rb +166 -0
- data/lib/faqieh/models/medium.rb +412 -0
- data/lib/faqieh/models/pagination.rb +195 -0
- data/lib/faqieh/models/platform.rb +40 -0
- data/lib/faqieh/models/playlist.rb +361 -0
- data/lib/faqieh/models/search200_response.rb +192 -0
- data/lib/faqieh/models/search_section.rb +187 -0
- data/lib/faqieh/models/search_section_facets.rb +243 -0
- data/lib/faqieh/models/speaker.rb +275 -0
- data/lib/faqieh/models/speaker_countries_inner.rb +202 -0
- data/lib/faqieh/models/transcript_detail.rb +297 -0
- data/lib/faqieh/models/transcript_search_result.rb +396 -0
- data/lib/faqieh/models/transcript_segment.rb +222 -0
- data/lib/faqieh/models/transcript_summary.rb +226 -0
- data/lib/faqieh/version.rb +15 -0
- data/lib/faqieh.rb +75 -0
- data/spec/spec_helper.rb +111 -0
- metadata +191 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Faqieh::ListPlaylists200Response
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **data** | [**Array<Playlist>**](Playlist.md) | | |
|
|
8
|
+
| **pagination** | [**Pagination**](Pagination.md) | | |
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```ruby
|
|
13
|
+
require 'faqieh'
|
|
14
|
+
|
|
15
|
+
instance = Faqieh::ListPlaylists200Response.new(
|
|
16
|
+
data: null,
|
|
17
|
+
pagination: null
|
|
18
|
+
)
|
|
19
|
+
```
|
|
20
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Faqieh::ListSpeakers200Response
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **data** | [**Array<Speaker>**](Speaker.md) | | |
|
|
8
|
+
| **pagination** | [**Pagination**](Pagination.md) | | |
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```ruby
|
|
13
|
+
require 'faqieh'
|
|
14
|
+
|
|
15
|
+
instance = Faqieh::ListSpeakers200Response.new(
|
|
16
|
+
data: null,
|
|
17
|
+
pagination: null
|
|
18
|
+
)
|
|
19
|
+
```
|
|
20
|
+
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Faqieh::ListTranscripts200Response
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **data** | [**Array<TranscriptSummary>**](TranscriptSummary.md) | | |
|
|
8
|
+
|
|
9
|
+
## Example
|
|
10
|
+
|
|
11
|
+
```ruby
|
|
12
|
+
require 'faqieh'
|
|
13
|
+
|
|
14
|
+
instance = Faqieh::ListTranscripts200Response.new(
|
|
15
|
+
data: null
|
|
16
|
+
)
|
|
17
|
+
```
|
|
18
|
+
|
data/docs/MediaApi.md
ADDED
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
# Faqieh::MediaApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *https://faqieh.com/api/v1*
|
|
4
|
+
|
|
5
|
+
| Method | HTTP request | Description |
|
|
6
|
+
| ------ | ------------ | ----------- |
|
|
7
|
+
| [**get_medium**](MediaApi.md#get_medium) | **GET** /media/{id} | Get a medium |
|
|
8
|
+
| [**list_media**](MediaApi.md#list_media) | **GET** /media | List media |
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
## get_medium
|
|
12
|
+
|
|
13
|
+
> <GetMedium200Response> get_medium(id, opts)
|
|
14
|
+
|
|
15
|
+
Get a medium
|
|
16
|
+
|
|
17
|
+
### Examples
|
|
18
|
+
|
|
19
|
+
```ruby
|
|
20
|
+
require 'time'
|
|
21
|
+
require 'faqieh'
|
|
22
|
+
|
|
23
|
+
api_instance = Faqieh::MediaApi.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 medium
|
|
33
|
+
result = api_instance.get_medium(id, opts)
|
|
34
|
+
p result
|
|
35
|
+
rescue Faqieh::ApiError => e
|
|
36
|
+
puts "Error when calling MediaApi->get_medium: #{e}"
|
|
37
|
+
end
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
#### Using the get_medium_with_http_info variant
|
|
41
|
+
|
|
42
|
+
This returns an Array which contains the response data, status code and headers.
|
|
43
|
+
|
|
44
|
+
> <Array(<GetMedium200Response>, Integer, Hash)> get_medium_with_http_info(id, opts)
|
|
45
|
+
|
|
46
|
+
```ruby
|
|
47
|
+
begin
|
|
48
|
+
# Get a medium
|
|
49
|
+
data, status_code, headers = api_instance.get_medium_with_http_info(id, opts)
|
|
50
|
+
p status_code # => 2xx
|
|
51
|
+
p headers # => { ... }
|
|
52
|
+
p data # => <GetMedium200Response>
|
|
53
|
+
rescue Faqieh::ApiError => e
|
|
54
|
+
puts "Error when calling MediaApi->get_medium_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; `id` is always included. | [optional] |
|
|
64
|
+
| **embed** | **String** | Comma-separated associations to inline (e.g. `speakers,channels`). | [optional] |
|
|
65
|
+
| **locale** | **String** | | [optional] |
|
|
66
|
+
|
|
67
|
+
### Return type
|
|
68
|
+
|
|
69
|
+
[**GetMedium200Response**](GetMedium200Response.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_media
|
|
82
|
+
|
|
83
|
+
> <ListMedia200Response> list_media(opts)
|
|
84
|
+
|
|
85
|
+
List media
|
|
86
|
+
|
|
87
|
+
Browse media by publication date, or search by relevance using q.
|
|
88
|
+
|
|
89
|
+
### Examples
|
|
90
|
+
|
|
91
|
+
```ruby
|
|
92
|
+
require 'time'
|
|
93
|
+
require 'faqieh'
|
|
94
|
+
|
|
95
|
+
api_instance = Faqieh::MediaApi.new
|
|
96
|
+
opts = {
|
|
97
|
+
q: 'q_example', # String | Full-text query (minimum 3 searchable characters, maximum 500 characters including whitespace).
|
|
98
|
+
page: 789, # Integer | Page number. Search-mode requests (with `q`) are clamped to page 100; `current_page` in the response reflects the served page.
|
|
99
|
+
per_page: 789, # Integer |
|
|
100
|
+
fields: 'fields_example', # String | Comma-separated attribute whitelist; `id` is always included.
|
|
101
|
+
embed: 'embed_example', # String | Comma-separated associations to inline (e.g. `speakers,channels`).
|
|
102
|
+
locale: 'ar', # String |
|
|
103
|
+
speaker_id: 789, # Integer | Filter to media linked to this speaker. Takes precedence over `channel_id` and `playlist_id`. The selected (highest-priority) filter 404s on an unknown id; ignored lower-priority params are not validated.
|
|
104
|
+
channel_id: 789, # Integer | Filter to media linked to this channel. Takes precedence over `playlist_id`; ignored when `speaker_id` is present.
|
|
105
|
+
playlist_id: 789 # Integer | Filter to media linked to this playlist. Ignored when `speaker_id` or `channel_id` is present.
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
begin
|
|
109
|
+
# List media
|
|
110
|
+
result = api_instance.list_media(opts)
|
|
111
|
+
p result
|
|
112
|
+
rescue Faqieh::ApiError => e
|
|
113
|
+
puts "Error when calling MediaApi->list_media: #{e}"
|
|
114
|
+
end
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
#### Using the list_media_with_http_info variant
|
|
118
|
+
|
|
119
|
+
This returns an Array which contains the response data, status code and headers.
|
|
120
|
+
|
|
121
|
+
> <Array(<ListMedia200Response>, Integer, Hash)> list_media_with_http_info(opts)
|
|
122
|
+
|
|
123
|
+
```ruby
|
|
124
|
+
begin
|
|
125
|
+
# List media
|
|
126
|
+
data, status_code, headers = api_instance.list_media_with_http_info(opts)
|
|
127
|
+
p status_code # => 2xx
|
|
128
|
+
p headers # => { ... }
|
|
129
|
+
p data # => <ListMedia200Response>
|
|
130
|
+
rescue Faqieh::ApiError => e
|
|
131
|
+
puts "Error when calling MediaApi->list_media_with_http_info: #{e}"
|
|
132
|
+
end
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
### Parameters
|
|
136
|
+
|
|
137
|
+
| Name | Type | Description | Notes |
|
|
138
|
+
| ---- | ---- | ----------- | ----- |
|
|
139
|
+
| **q** | **String** | Full-text query (minimum 3 searchable characters, maximum 500 characters including whitespace). | [optional] |
|
|
140
|
+
| **page** | **Integer** | Page number. Search-mode requests (with `q`) are clamped to page 100; `current_page` in the response reflects the served page. | [optional] |
|
|
141
|
+
| **per_page** | **Integer** | | [optional][default to 10] |
|
|
142
|
+
| **fields** | **String** | Comma-separated attribute whitelist; `id` is always included. | [optional] |
|
|
143
|
+
| **embed** | **String** | Comma-separated associations to inline (e.g. `speakers,channels`). | [optional] |
|
|
144
|
+
| **locale** | **String** | | [optional] |
|
|
145
|
+
| **speaker_id** | **Integer** | Filter to media linked to this speaker. Takes precedence over `channel_id` and `playlist_id`. The selected (highest-priority) filter 404s on an unknown id; ignored lower-priority params are not validated. | [optional] |
|
|
146
|
+
| **channel_id** | **Integer** | Filter to media linked to this channel. Takes precedence over `playlist_id`; ignored when `speaker_id` is present. | [optional] |
|
|
147
|
+
| **playlist_id** | **Integer** | Filter to media linked to this playlist. Ignored when `speaker_id` or `channel_id` is present. | [optional] |
|
|
148
|
+
|
|
149
|
+
### Return type
|
|
150
|
+
|
|
151
|
+
[**ListMedia200Response**](ListMedia200Response.md)
|
|
152
|
+
|
|
153
|
+
### Authorization
|
|
154
|
+
|
|
155
|
+
No authorization required
|
|
156
|
+
|
|
157
|
+
### HTTP request headers
|
|
158
|
+
|
|
159
|
+
- **Content-Type**: Not defined
|
|
160
|
+
- **Accept**: application/json
|
|
161
|
+
|
data/docs/Medium.md
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# Faqieh::Medium
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **id** | **Integer** | | |
|
|
8
|
+
| **title** | **String** | | [optional] |
|
|
9
|
+
| **description** | **String** | | [optional] |
|
|
10
|
+
| **platform** | [**Platform**](Platform.md) | | [optional] |
|
|
11
|
+
| **platform_id** | **String** | | [optional] |
|
|
12
|
+
| **audio_url** | **String** | | [optional] |
|
|
13
|
+
| **duration** | **Integer** | | [optional] |
|
|
14
|
+
| **published_at** | **Time** | | [optional] |
|
|
15
|
+
| **source_available** | **Boolean** | | [optional] |
|
|
16
|
+
| **source_unavailable_at** | **Time** | | [optional] |
|
|
17
|
+
| **speakers_count** | **Integer** | | [optional] |
|
|
18
|
+
| **channels_count** | **Integer** | | [optional] |
|
|
19
|
+
| **playlists_count** | **Integer** | | [optional] |
|
|
20
|
+
| **platform_label** | **String** | | [optional] |
|
|
21
|
+
| **url** | **String** | Localized Faqieh webpage URL for this recording. | [optional] |
|
|
22
|
+
| **source_url** | **String** | Original source URL; equals url when platform is faqieh. | [optional] |
|
|
23
|
+
| **duration_label** | **String** | | [optional] |
|
|
24
|
+
| **has_audio** | **Boolean** | | [optional] |
|
|
25
|
+
| **has_transcript** | **Boolean** | | [optional] |
|
|
26
|
+
| **thumbnail_urls** | **Hash<String, String>** | | [optional] |
|
|
27
|
+
| **transcripts** | [**Array<TranscriptSummary>**](TranscriptSummary.md) | | [optional] |
|
|
28
|
+
| **speakers** | [**Array<Speaker>**](Speaker.md) | | [optional] |
|
|
29
|
+
| **channels** | [**Array<Channel>**](Channel.md) | | [optional] |
|
|
30
|
+
| **playlists** | [**Array<Playlist>**](Playlist.md) | | [optional] |
|
|
31
|
+
|
|
32
|
+
## Example
|
|
33
|
+
|
|
34
|
+
```ruby
|
|
35
|
+
require 'faqieh'
|
|
36
|
+
|
|
37
|
+
instance = Faqieh::Medium.new(
|
|
38
|
+
id: null,
|
|
39
|
+
title: null,
|
|
40
|
+
description: null,
|
|
41
|
+
platform: null,
|
|
42
|
+
platform_id: null,
|
|
43
|
+
audio_url: null,
|
|
44
|
+
duration: null,
|
|
45
|
+
published_at: null,
|
|
46
|
+
source_available: null,
|
|
47
|
+
source_unavailable_at: null,
|
|
48
|
+
speakers_count: null,
|
|
49
|
+
channels_count: null,
|
|
50
|
+
playlists_count: null,
|
|
51
|
+
platform_label: null,
|
|
52
|
+
url: null,
|
|
53
|
+
source_url: null,
|
|
54
|
+
duration_label: null,
|
|
55
|
+
has_audio: null,
|
|
56
|
+
has_transcript: null,
|
|
57
|
+
thumbnail_urls: null,
|
|
58
|
+
transcripts: null,
|
|
59
|
+
speakers: null,
|
|
60
|
+
channels: null,
|
|
61
|
+
playlists: null
|
|
62
|
+
)
|
|
63
|
+
```
|
|
64
|
+
|
data/docs/Pagination.md
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Faqieh::Pagination
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **current_page** | **Integer** | | [optional] |
|
|
8
|
+
| **per_page** | **Integer** | | [optional] |
|
|
9
|
+
| **total_count** | **Integer** | | [optional] |
|
|
10
|
+
| **total_pages** | **Integer** | | [optional] |
|
|
11
|
+
| **next_page** | **Integer** | | [optional] |
|
|
12
|
+
| **prev_page** | **Integer** | | [optional] |
|
|
13
|
+
|
|
14
|
+
## Example
|
|
15
|
+
|
|
16
|
+
```ruby
|
|
17
|
+
require 'faqieh'
|
|
18
|
+
|
|
19
|
+
instance = Faqieh::Pagination.new(
|
|
20
|
+
current_page: null,
|
|
21
|
+
per_page: null,
|
|
22
|
+
total_count: null,
|
|
23
|
+
total_pages: null,
|
|
24
|
+
next_page: null,
|
|
25
|
+
prev_page: null
|
|
26
|
+
)
|
|
27
|
+
```
|
|
28
|
+
|
data/docs/Platform.md
ADDED
data/docs/Playlist.md
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# Faqieh::Playlist
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **id** | **Integer** | | |
|
|
8
|
+
| **title** | **String** | | [optional] |
|
|
9
|
+
| **description** | **String** | | [optional] |
|
|
10
|
+
| **platform** | [**Platform**](Platform.md) | | [optional] |
|
|
11
|
+
| **platform_id** | **String** | | [optional] |
|
|
12
|
+
| **dominant_color** | **String** | | [optional] |
|
|
13
|
+
| **published_at** | **Time** | | [optional] |
|
|
14
|
+
| **source_available** | **Boolean** | | [optional] |
|
|
15
|
+
| **source_unavailable_at** | **Time** | | [optional] |
|
|
16
|
+
| **media_count** | **Integer** | | [optional] |
|
|
17
|
+
| **hours_count** | **Integer** | | [optional] |
|
|
18
|
+
| **channels_count** | **Integer** | | [optional] |
|
|
19
|
+
| **speakers_count** | **Integer** | | [optional] |
|
|
20
|
+
| **platform_label** | **String** | | [optional] |
|
|
21
|
+
| **url** | **String** | Localized Faqieh webpage URL for this playlist. | [optional] |
|
|
22
|
+
| **source_url** | **String** | Original source URL; equals url when platform is faqieh. | [optional] |
|
|
23
|
+
| **thumbnail_urls** | **Hash<String, String>** | | [optional] |
|
|
24
|
+
| **speakers** | [**Array<Speaker>**](Speaker.md) | | [optional] |
|
|
25
|
+
| **channels** | [**Array<Channel>**](Channel.md) | | [optional] |
|
|
26
|
+
|
|
27
|
+
## Example
|
|
28
|
+
|
|
29
|
+
```ruby
|
|
30
|
+
require 'faqieh'
|
|
31
|
+
|
|
32
|
+
instance = Faqieh::Playlist.new(
|
|
33
|
+
id: null,
|
|
34
|
+
title: null,
|
|
35
|
+
description: null,
|
|
36
|
+
platform: null,
|
|
37
|
+
platform_id: null,
|
|
38
|
+
dominant_color: null,
|
|
39
|
+
published_at: null,
|
|
40
|
+
source_available: null,
|
|
41
|
+
source_unavailable_at: null,
|
|
42
|
+
media_count: null,
|
|
43
|
+
hours_count: null,
|
|
44
|
+
channels_count: null,
|
|
45
|
+
speakers_count: null,
|
|
46
|
+
platform_label: null,
|
|
47
|
+
url: null,
|
|
48
|
+
source_url: null,
|
|
49
|
+
thumbnail_urls: null,
|
|
50
|
+
speakers: null,
|
|
51
|
+
channels: null
|
|
52
|
+
)
|
|
53
|
+
```
|
|
54
|
+
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
# Faqieh::PlaylistsApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *https://faqieh.com/api/v1*
|
|
4
|
+
|
|
5
|
+
| Method | HTTP request | Description |
|
|
6
|
+
| ------ | ------------ | ----------- |
|
|
7
|
+
| [**get_playlist**](PlaylistsApi.md#get_playlist) | **GET** /playlists/{id} | Get a playlist |
|
|
8
|
+
| [**list_playlists**](PlaylistsApi.md#list_playlists) | **GET** /playlists | List playlists |
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
## get_playlist
|
|
12
|
+
|
|
13
|
+
> <GetPlaylist200Response> get_playlist(id, opts)
|
|
14
|
+
|
|
15
|
+
Get a playlist
|
|
16
|
+
|
|
17
|
+
### Examples
|
|
18
|
+
|
|
19
|
+
```ruby
|
|
20
|
+
require 'time'
|
|
21
|
+
require 'faqieh'
|
|
22
|
+
|
|
23
|
+
api_instance = Faqieh::PlaylistsApi.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 playlist
|
|
33
|
+
result = api_instance.get_playlist(id, opts)
|
|
34
|
+
p result
|
|
35
|
+
rescue Faqieh::ApiError => e
|
|
36
|
+
puts "Error when calling PlaylistsApi->get_playlist: #{e}"
|
|
37
|
+
end
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
#### Using the get_playlist_with_http_info variant
|
|
41
|
+
|
|
42
|
+
This returns an Array which contains the response data, status code and headers.
|
|
43
|
+
|
|
44
|
+
> <Array(<GetPlaylist200Response>, Integer, Hash)> get_playlist_with_http_info(id, opts)
|
|
45
|
+
|
|
46
|
+
```ruby
|
|
47
|
+
begin
|
|
48
|
+
# Get a playlist
|
|
49
|
+
data, status_code, headers = api_instance.get_playlist_with_http_info(id, opts)
|
|
50
|
+
p status_code # => 2xx
|
|
51
|
+
p headers # => { ... }
|
|
52
|
+
p data # => <GetPlaylist200Response>
|
|
53
|
+
rescue Faqieh::ApiError => e
|
|
54
|
+
puts "Error when calling PlaylistsApi->get_playlist_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; `id` is always included. | [optional] |
|
|
64
|
+
| **embed** | **String** | Comma-separated associations to inline (e.g. `speakers,channels`). | [optional] |
|
|
65
|
+
| **locale** | **String** | | [optional] |
|
|
66
|
+
|
|
67
|
+
### Return type
|
|
68
|
+
|
|
69
|
+
[**GetPlaylist200Response**](GetPlaylist200Response.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_playlists
|
|
82
|
+
|
|
83
|
+
> <ListPlaylists200Response> list_playlists(opts)
|
|
84
|
+
|
|
85
|
+
List playlists
|
|
86
|
+
|
|
87
|
+
### Examples
|
|
88
|
+
|
|
89
|
+
```ruby
|
|
90
|
+
require 'time'
|
|
91
|
+
require 'faqieh'
|
|
92
|
+
|
|
93
|
+
api_instance = Faqieh::PlaylistsApi.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
|
+
speaker_id: 789, # Integer | Filter to playlists linked to this speaker. Takes precedence over `channel_id`; an unknown id returns 404.
|
|
103
|
+
channel_id: 789 # Integer | Filter to playlists linked to this channel. Ignored when `speaker_id` is present; an unknown id returns 404.
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
begin
|
|
107
|
+
# List playlists
|
|
108
|
+
result = api_instance.list_playlists(opts)
|
|
109
|
+
p result
|
|
110
|
+
rescue Faqieh::ApiError => e
|
|
111
|
+
puts "Error when calling PlaylistsApi->list_playlists: #{e}"
|
|
112
|
+
end
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
#### Using the list_playlists_with_http_info variant
|
|
116
|
+
|
|
117
|
+
This returns an Array which contains the response data, status code and headers.
|
|
118
|
+
|
|
119
|
+
> <Array(<ListPlaylists200Response>, Integer, Hash)> list_playlists_with_http_info(opts)
|
|
120
|
+
|
|
121
|
+
```ruby
|
|
122
|
+
begin
|
|
123
|
+
# List playlists
|
|
124
|
+
data, status_code, headers = api_instance.list_playlists_with_http_info(opts)
|
|
125
|
+
p status_code # => 2xx
|
|
126
|
+
p headers # => { ... }
|
|
127
|
+
p data # => <ListPlaylists200Response>
|
|
128
|
+
rescue Faqieh::ApiError => e
|
|
129
|
+
puts "Error when calling PlaylistsApi->list_playlists_with_http_info: #{e}"
|
|
130
|
+
end
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
### Parameters
|
|
134
|
+
|
|
135
|
+
| Name | Type | Description | Notes |
|
|
136
|
+
| ---- | ---- | ----------- | ----- |
|
|
137
|
+
| **q** | **String** | Full-text query (minimum 3 searchable characters, maximum 500 characters including whitespace). | [optional] |
|
|
138
|
+
| **page** | **Integer** | Page number. Search-mode requests (with `q`) are clamped to page 100; `current_page` in the response reflects the served page. | [optional] |
|
|
139
|
+
| **per_page** | **Integer** | | [optional][default to 10] |
|
|
140
|
+
| **fields** | **String** | Comma-separated attribute whitelist; `id` is always included. | [optional] |
|
|
141
|
+
| **embed** | **String** | Comma-separated associations to inline (e.g. `speakers,channels`). | [optional] |
|
|
142
|
+
| **locale** | **String** | | [optional] |
|
|
143
|
+
| **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] |
|
|
144
|
+
| **speaker_id** | **Integer** | Filter to playlists linked to this speaker. Takes precedence over `channel_id`; an unknown id returns 404. | [optional] |
|
|
145
|
+
| **channel_id** | **Integer** | Filter to playlists linked to this channel. Ignored when `speaker_id` is present; an unknown id returns 404. | [optional] |
|
|
146
|
+
|
|
147
|
+
### Return type
|
|
148
|
+
|
|
149
|
+
[**ListPlaylists200Response**](ListPlaylists200Response.md)
|
|
150
|
+
|
|
151
|
+
### Authorization
|
|
152
|
+
|
|
153
|
+
No authorization required
|
|
154
|
+
|
|
155
|
+
### HTTP request headers
|
|
156
|
+
|
|
157
|
+
- **Content-Type**: Not defined
|
|
158
|
+
- **Accept**: application/json
|
|
159
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Faqieh::Search200Response
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **query** | **String** | | |
|
|
8
|
+
| **data** | [**Hash<String, SearchSection>**](SearchSection.md) | | |
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```ruby
|
|
13
|
+
require 'faqieh'
|
|
14
|
+
|
|
15
|
+
instance = Faqieh::Search200Response.new(
|
|
16
|
+
query: null,
|
|
17
|
+
data: null
|
|
18
|
+
)
|
|
19
|
+
```
|
|
20
|
+
|
data/docs/SearchApi.md
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
# Faqieh::SearchApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *https://faqieh.com/api/v1*
|
|
4
|
+
|
|
5
|
+
| Method | HTTP request | Description |
|
|
6
|
+
| ------ | ------------ | ----------- |
|
|
7
|
+
| [**search**](SearchApi.md#search) | **GET** /search | Cross-type search preview |
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
## search
|
|
11
|
+
|
|
12
|
+
> <Search200Response> search(q, opts)
|
|
13
|
+
|
|
14
|
+
Cross-type search preview
|
|
15
|
+
|
|
16
|
+
Searches speakers, channels, playlists, media, and transcript segments. Returns a page of up to 10 results for each requested type. Pass `page` to continue, following each section's `next_page` until null. Restrict types with `?types=`. `speaker_ids[]` / `channel_ids[]` filter the `media`, `playlists`, and `transcripts` sections; `playlist_ids[]` filters `media` and `transcripts`. Ids within one filter are ORed, filters are ANDed. The `speakers` and `channels` sections ignore them. Filter ids are constraints, not resources: unknown or out-of-range ids match nothing instead of returning 404. Each filter accepts at most 100 IDs. Oversized selections are rejected before searching, without truncation. `published_from` / `published_to` filter `media` and `transcripts` by their media publication date. Either inclusive UTC date boundary may be supplied. The other sections ignore them. `duration_min` / `duration_max` filter `media` and `transcripts` by the full recording's duration in whole seconds, with inclusive bounds. Either bound may be omitted. Recordings with unknown durations do not match an active range. The other sections ignore these parameters. Discover filter ids via `/speakers?q=<term>&include_empty=true&fields=id,name`, `/channels?q=<term>&include_empty=true&fields=id,name`, and `/playlists?q=<term>&include_empty=true&fields=id,title` (without `include_empty=true` those endpoints hide zero-hour records that can still appear in facets), or pass `facets=true` for counted options. Each filter's facet options are constrained by the selections in the other filters, never its own — so alternatives within a filter stay visible.
|
|
17
|
+
|
|
18
|
+
### Examples
|
|
19
|
+
|
|
20
|
+
```ruby
|
|
21
|
+
require 'time'
|
|
22
|
+
require 'faqieh'
|
|
23
|
+
|
|
24
|
+
api_instance = Faqieh::SearchApi.new
|
|
25
|
+
q = 'q_example' # String | Full-text query (minimum 3 searchable characters, maximum 500 characters including whitespace).
|
|
26
|
+
opts = {
|
|
27
|
+
types: 'types_example', # String | Comma-separated subset of `speakers,channels,playlists,media,transcripts`. Defaults to all.
|
|
28
|
+
page: 789, # Integer | Page number. Search-mode requests (with `q`) are clamped to page 100; `current_page` in the response reflects the served page.
|
|
29
|
+
speaker_ids: [3.56], # Array<Integer> | Only return results linked to any of these speakers.
|
|
30
|
+
channel_ids: [3.56], # Array<Integer> | Only return results linked to any of these channels.
|
|
31
|
+
playlist_ids: [3.56], # Array<Integer> | Only return media and transcript results belonging to any of these playlists. The `playlists` section ignores it.
|
|
32
|
+
published_from: Date.parse('2013-10-20'), # Date | Inclusive earliest media publication date, as a Gregorian `YYYY-MM-DD` UTC calendar date (years 0001-9999). Applies to media and transcripts.
|
|
33
|
+
published_to: Date.parse('2013-10-20'), # Date | Inclusive latest media publication date, as a Gregorian `YYYY-MM-DD` UTC calendar date (years 0001-9999). Applies to media and transcripts.
|
|
34
|
+
duration_min: 789, # Integer | Inclusive minimum full recording duration in whole seconds. Applies to media and transcripts. Must be less than or equal to duration_max when both are supplied.
|
|
35
|
+
duration_max: 789, # Integer | Inclusive maximum full recording duration in whole seconds. Applies to media and transcripts.
|
|
36
|
+
facets: true, # Boolean | Add per-filter facet options to each filterable section. Up to 50 options ordered by count. Transcript counts are approximate distinct-media counts selected from candidates ranked by matching-segment frequency.
|
|
37
|
+
locale: 'ar' # String |
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
begin
|
|
41
|
+
# Cross-type search preview
|
|
42
|
+
result = api_instance.search(q, opts)
|
|
43
|
+
p result
|
|
44
|
+
rescue Faqieh::ApiError => e
|
|
45
|
+
puts "Error when calling SearchApi->search: #{e}"
|
|
46
|
+
end
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
#### Using the search_with_http_info variant
|
|
50
|
+
|
|
51
|
+
This returns an Array which contains the response data, status code and headers.
|
|
52
|
+
|
|
53
|
+
> <Array(<Search200Response>, Integer, Hash)> search_with_http_info(q, opts)
|
|
54
|
+
|
|
55
|
+
```ruby
|
|
56
|
+
begin
|
|
57
|
+
# Cross-type search preview
|
|
58
|
+
data, status_code, headers = api_instance.search_with_http_info(q, opts)
|
|
59
|
+
p status_code # => 2xx
|
|
60
|
+
p headers # => { ... }
|
|
61
|
+
p data # => <Search200Response>
|
|
62
|
+
rescue Faqieh::ApiError => e
|
|
63
|
+
puts "Error when calling SearchApi->search_with_http_info: #{e}"
|
|
64
|
+
end
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### Parameters
|
|
68
|
+
|
|
69
|
+
| Name | Type | Description | Notes |
|
|
70
|
+
| ---- | ---- | ----------- | ----- |
|
|
71
|
+
| **q** | **String** | Full-text query (minimum 3 searchable characters, maximum 500 characters including whitespace). | |
|
|
72
|
+
| **types** | **String** | Comma-separated subset of `speakers,channels,playlists,media,transcripts`. Defaults to all. | [optional] |
|
|
73
|
+
| **page** | **Integer** | Page number. Search-mode requests (with `q`) are clamped to page 100; `current_page` in the response reflects the served page. | [optional] |
|
|
74
|
+
| **speaker_ids** | [**Array<Integer>**](Integer.md) | Only return results linked to any of these speakers. | [optional] |
|
|
75
|
+
| **channel_ids** | [**Array<Integer>**](Integer.md) | Only return results linked to any of these channels. | [optional] |
|
|
76
|
+
| **playlist_ids** | [**Array<Integer>**](Integer.md) | Only return media and transcript results belonging to any of these playlists. The `playlists` section ignores it. | [optional] |
|
|
77
|
+
| **published_from** | **Date** | Inclusive earliest media publication date, as a Gregorian `YYYY-MM-DD` UTC calendar date (years 0001-9999). Applies to media and transcripts. | [optional] |
|
|
78
|
+
| **published_to** | **Date** | Inclusive latest media publication date, as a Gregorian `YYYY-MM-DD` UTC calendar date (years 0001-9999). Applies to media and transcripts. | [optional] |
|
|
79
|
+
| **duration_min** | **Integer** | Inclusive minimum full recording duration in whole seconds. Applies to media and transcripts. Must be less than or equal to duration_max when both are supplied. | [optional] |
|
|
80
|
+
| **duration_max** | **Integer** | Inclusive maximum full recording duration in whole seconds. Applies to media and transcripts. | [optional] |
|
|
81
|
+
| **facets** | **Boolean** | Add per-filter facet options to each filterable section. Up to 50 options ordered by count. Transcript counts are approximate distinct-media counts selected from candidates ranked by matching-segment frequency. | [optional] |
|
|
82
|
+
| **locale** | **String** | | [optional] |
|
|
83
|
+
|
|
84
|
+
### Return type
|
|
85
|
+
|
|
86
|
+
[**Search200Response**](Search200Response.md)
|
|
87
|
+
|
|
88
|
+
### Authorization
|
|
89
|
+
|
|
90
|
+
No authorization required
|
|
91
|
+
|
|
92
|
+
### HTTP request headers
|
|
93
|
+
|
|
94
|
+
- **Content-Type**: Not defined
|
|
95
|
+
- **Accept**: application/json
|
|
96
|
+
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Faqieh::SearchSection
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **results** | **Array<Object>** | | |
|
|
8
|
+
| **next_page** | **Integer** | | |
|
|
9
|
+
| **facets** | [**SearchSectionFacets**](SearchSectionFacets.md) | | [optional] |
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```ruby
|
|
14
|
+
require 'faqieh'
|
|
15
|
+
|
|
16
|
+
instance = Faqieh::SearchSection.new(
|
|
17
|
+
results: null,
|
|
18
|
+
next_page: null,
|
|
19
|
+
facets: null
|
|
20
|
+
)
|
|
21
|
+
```
|
|
22
|
+
|