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,192 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Faqieh Public API
|
|
3
|
+
|
|
4
|
+
#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.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.25.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module Faqieh
|
|
17
|
+
class ListChannels200Response < ApiModelBase
|
|
18
|
+
attr_accessor :data
|
|
19
|
+
|
|
20
|
+
attr_accessor :pagination
|
|
21
|
+
|
|
22
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
23
|
+
def self.attribute_map
|
|
24
|
+
{
|
|
25
|
+
:'data' => :'data',
|
|
26
|
+
:'pagination' => :'pagination'
|
|
27
|
+
}
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
# Returns attribute mapping this model knows about
|
|
31
|
+
def self.acceptable_attribute_map
|
|
32
|
+
attribute_map
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# Returns all the JSON keys this model knows about
|
|
36
|
+
def self.acceptable_attributes
|
|
37
|
+
acceptable_attribute_map.values
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
# Attribute type mapping.
|
|
41
|
+
def self.openapi_types
|
|
42
|
+
{
|
|
43
|
+
:'data' => :'Array<Channel>',
|
|
44
|
+
:'pagination' => :'Pagination'
|
|
45
|
+
}
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# List of attributes with nullable: true
|
|
49
|
+
def self.openapi_nullable
|
|
50
|
+
Set.new([
|
|
51
|
+
])
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
# Initializes the object
|
|
55
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
56
|
+
def initialize(attributes = {})
|
|
57
|
+
if (!attributes.is_a?(Hash))
|
|
58
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Faqieh::ListChannels200Response` initialize method"
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
62
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
63
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
64
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
65
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Faqieh::ListChannels200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
66
|
+
end
|
|
67
|
+
h[k.to_sym] = v
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
if attributes.key?(:'data')
|
|
71
|
+
if (value = attributes[:'data']).is_a?(Array)
|
|
72
|
+
self.data = value
|
|
73
|
+
end
|
|
74
|
+
else
|
|
75
|
+
self.data = nil
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
if attributes.key?(:'pagination')
|
|
79
|
+
self.pagination = attributes[:'pagination']
|
|
80
|
+
else
|
|
81
|
+
self.pagination = nil
|
|
82
|
+
end
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
86
|
+
# @return Array for valid properties with the reasons
|
|
87
|
+
def list_invalid_properties
|
|
88
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
89
|
+
invalid_properties = Array.new
|
|
90
|
+
if @data.nil?
|
|
91
|
+
invalid_properties.push('invalid value for "data", data cannot be nil.')
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
if @pagination.nil?
|
|
95
|
+
invalid_properties.push('invalid value for "pagination", pagination cannot be nil.')
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
invalid_properties
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# Check to see if the all the properties in the model are valid
|
|
102
|
+
# @return true if the model is valid
|
|
103
|
+
def valid?
|
|
104
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
105
|
+
return false if @data.nil?
|
|
106
|
+
return false if @pagination.nil?
|
|
107
|
+
true
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
# Custom attribute writer method with validation
|
|
111
|
+
# @param [Object] data Value to be assigned
|
|
112
|
+
def data=(data)
|
|
113
|
+
if data.nil?
|
|
114
|
+
fail ArgumentError, 'data cannot be nil'
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
@data = data
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
# Custom attribute writer method with validation
|
|
121
|
+
# @param [Object] pagination Value to be assigned
|
|
122
|
+
def pagination=(pagination)
|
|
123
|
+
if pagination.nil?
|
|
124
|
+
fail ArgumentError, 'pagination cannot be nil'
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
@pagination = pagination
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
# Checks equality by comparing each attribute.
|
|
131
|
+
# @param [Object] Object to be compared
|
|
132
|
+
def ==(o)
|
|
133
|
+
return true if self.equal?(o)
|
|
134
|
+
self.class == o.class &&
|
|
135
|
+
data == o.data &&
|
|
136
|
+
pagination == o.pagination
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
# @see the `==` method
|
|
140
|
+
# @param [Object] Object to be compared
|
|
141
|
+
def eql?(o)
|
|
142
|
+
self == o
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
# Calculates hash code according to all attributes.
|
|
146
|
+
# @return [Integer] Hash code
|
|
147
|
+
def hash
|
|
148
|
+
[data, pagination].hash
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
# Builds the object from hash
|
|
152
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
153
|
+
# @return [Object] Returns the model itself
|
|
154
|
+
def self.build_from_hash(attributes)
|
|
155
|
+
return nil unless attributes.is_a?(Hash)
|
|
156
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
157
|
+
transformed_hash = {}
|
|
158
|
+
openapi_types.each_pair do |key, type|
|
|
159
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
160
|
+
transformed_hash["#{key}"] = nil
|
|
161
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
162
|
+
# check to ensure the input is an array given that the attribute
|
|
163
|
+
# is documented as an array but the input is not
|
|
164
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
165
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
166
|
+
end
|
|
167
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
168
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
169
|
+
end
|
|
170
|
+
end
|
|
171
|
+
new(transformed_hash)
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
# Returns the object in the form of hash
|
|
175
|
+
# @return [Hash] Returns the object in the form of hash
|
|
176
|
+
def to_hash
|
|
177
|
+
hash = {}
|
|
178
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
179
|
+
value = self.send(attr)
|
|
180
|
+
if value.nil?
|
|
181
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
182
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
183
|
+
end
|
|
184
|
+
|
|
185
|
+
hash[param] = _to_hash(value)
|
|
186
|
+
end
|
|
187
|
+
hash
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
end
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Faqieh Public API
|
|
3
|
+
|
|
4
|
+
#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.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.25.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module Faqieh
|
|
17
|
+
class ListMedia200Response < ApiModelBase
|
|
18
|
+
attr_accessor :data
|
|
19
|
+
|
|
20
|
+
attr_accessor :pagination
|
|
21
|
+
|
|
22
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
23
|
+
def self.attribute_map
|
|
24
|
+
{
|
|
25
|
+
:'data' => :'data',
|
|
26
|
+
:'pagination' => :'pagination'
|
|
27
|
+
}
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
# Returns attribute mapping this model knows about
|
|
31
|
+
def self.acceptable_attribute_map
|
|
32
|
+
attribute_map
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# Returns all the JSON keys this model knows about
|
|
36
|
+
def self.acceptable_attributes
|
|
37
|
+
acceptable_attribute_map.values
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
# Attribute type mapping.
|
|
41
|
+
def self.openapi_types
|
|
42
|
+
{
|
|
43
|
+
:'data' => :'Array<Medium>',
|
|
44
|
+
:'pagination' => :'Pagination'
|
|
45
|
+
}
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# List of attributes with nullable: true
|
|
49
|
+
def self.openapi_nullable
|
|
50
|
+
Set.new([
|
|
51
|
+
])
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
# Initializes the object
|
|
55
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
56
|
+
def initialize(attributes = {})
|
|
57
|
+
if (!attributes.is_a?(Hash))
|
|
58
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Faqieh::ListMedia200Response` initialize method"
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
62
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
63
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
64
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
65
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Faqieh::ListMedia200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
66
|
+
end
|
|
67
|
+
h[k.to_sym] = v
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
if attributes.key?(:'data')
|
|
71
|
+
if (value = attributes[:'data']).is_a?(Array)
|
|
72
|
+
self.data = value
|
|
73
|
+
end
|
|
74
|
+
else
|
|
75
|
+
self.data = nil
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
if attributes.key?(:'pagination')
|
|
79
|
+
self.pagination = attributes[:'pagination']
|
|
80
|
+
else
|
|
81
|
+
self.pagination = nil
|
|
82
|
+
end
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
86
|
+
# @return Array for valid properties with the reasons
|
|
87
|
+
def list_invalid_properties
|
|
88
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
89
|
+
invalid_properties = Array.new
|
|
90
|
+
if @data.nil?
|
|
91
|
+
invalid_properties.push('invalid value for "data", data cannot be nil.')
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
if @pagination.nil?
|
|
95
|
+
invalid_properties.push('invalid value for "pagination", pagination cannot be nil.')
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
invalid_properties
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# Check to see if the all the properties in the model are valid
|
|
102
|
+
# @return true if the model is valid
|
|
103
|
+
def valid?
|
|
104
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
105
|
+
return false if @data.nil?
|
|
106
|
+
return false if @pagination.nil?
|
|
107
|
+
true
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
# Custom attribute writer method with validation
|
|
111
|
+
# @param [Object] data Value to be assigned
|
|
112
|
+
def data=(data)
|
|
113
|
+
if data.nil?
|
|
114
|
+
fail ArgumentError, 'data cannot be nil'
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
@data = data
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
# Custom attribute writer method with validation
|
|
121
|
+
# @param [Object] pagination Value to be assigned
|
|
122
|
+
def pagination=(pagination)
|
|
123
|
+
if pagination.nil?
|
|
124
|
+
fail ArgumentError, 'pagination cannot be nil'
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
@pagination = pagination
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
# Checks equality by comparing each attribute.
|
|
131
|
+
# @param [Object] Object to be compared
|
|
132
|
+
def ==(o)
|
|
133
|
+
return true if self.equal?(o)
|
|
134
|
+
self.class == o.class &&
|
|
135
|
+
data == o.data &&
|
|
136
|
+
pagination == o.pagination
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
# @see the `==` method
|
|
140
|
+
# @param [Object] Object to be compared
|
|
141
|
+
def eql?(o)
|
|
142
|
+
self == o
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
# Calculates hash code according to all attributes.
|
|
146
|
+
# @return [Integer] Hash code
|
|
147
|
+
def hash
|
|
148
|
+
[data, pagination].hash
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
# Builds the object from hash
|
|
152
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
153
|
+
# @return [Object] Returns the model itself
|
|
154
|
+
def self.build_from_hash(attributes)
|
|
155
|
+
return nil unless attributes.is_a?(Hash)
|
|
156
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
157
|
+
transformed_hash = {}
|
|
158
|
+
openapi_types.each_pair do |key, type|
|
|
159
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
160
|
+
transformed_hash["#{key}"] = nil
|
|
161
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
162
|
+
# check to ensure the input is an array given that the attribute
|
|
163
|
+
# is documented as an array but the input is not
|
|
164
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
165
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
166
|
+
end
|
|
167
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
168
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
169
|
+
end
|
|
170
|
+
end
|
|
171
|
+
new(transformed_hash)
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
# Returns the object in the form of hash
|
|
175
|
+
# @return [Hash] Returns the object in the form of hash
|
|
176
|
+
def to_hash
|
|
177
|
+
hash = {}
|
|
178
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
179
|
+
value = self.send(attr)
|
|
180
|
+
if value.nil?
|
|
181
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
182
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
183
|
+
end
|
|
184
|
+
|
|
185
|
+
hash[param] = _to_hash(value)
|
|
186
|
+
end
|
|
187
|
+
hash
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
end
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Faqieh Public API
|
|
3
|
+
|
|
4
|
+
#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.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.25.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module Faqieh
|
|
17
|
+
class ListPlaylists200Response < ApiModelBase
|
|
18
|
+
attr_accessor :data
|
|
19
|
+
|
|
20
|
+
attr_accessor :pagination
|
|
21
|
+
|
|
22
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
23
|
+
def self.attribute_map
|
|
24
|
+
{
|
|
25
|
+
:'data' => :'data',
|
|
26
|
+
:'pagination' => :'pagination'
|
|
27
|
+
}
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
# Returns attribute mapping this model knows about
|
|
31
|
+
def self.acceptable_attribute_map
|
|
32
|
+
attribute_map
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# Returns all the JSON keys this model knows about
|
|
36
|
+
def self.acceptable_attributes
|
|
37
|
+
acceptable_attribute_map.values
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
# Attribute type mapping.
|
|
41
|
+
def self.openapi_types
|
|
42
|
+
{
|
|
43
|
+
:'data' => :'Array<Playlist>',
|
|
44
|
+
:'pagination' => :'Pagination'
|
|
45
|
+
}
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# List of attributes with nullable: true
|
|
49
|
+
def self.openapi_nullable
|
|
50
|
+
Set.new([
|
|
51
|
+
])
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
# Initializes the object
|
|
55
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
56
|
+
def initialize(attributes = {})
|
|
57
|
+
if (!attributes.is_a?(Hash))
|
|
58
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Faqieh::ListPlaylists200Response` initialize method"
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
62
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
63
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
64
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
65
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Faqieh::ListPlaylists200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
66
|
+
end
|
|
67
|
+
h[k.to_sym] = v
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
if attributes.key?(:'data')
|
|
71
|
+
if (value = attributes[:'data']).is_a?(Array)
|
|
72
|
+
self.data = value
|
|
73
|
+
end
|
|
74
|
+
else
|
|
75
|
+
self.data = nil
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
if attributes.key?(:'pagination')
|
|
79
|
+
self.pagination = attributes[:'pagination']
|
|
80
|
+
else
|
|
81
|
+
self.pagination = nil
|
|
82
|
+
end
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
86
|
+
# @return Array for valid properties with the reasons
|
|
87
|
+
def list_invalid_properties
|
|
88
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
89
|
+
invalid_properties = Array.new
|
|
90
|
+
if @data.nil?
|
|
91
|
+
invalid_properties.push('invalid value for "data", data cannot be nil.')
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
if @pagination.nil?
|
|
95
|
+
invalid_properties.push('invalid value for "pagination", pagination cannot be nil.')
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
invalid_properties
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# Check to see if the all the properties in the model are valid
|
|
102
|
+
# @return true if the model is valid
|
|
103
|
+
def valid?
|
|
104
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
105
|
+
return false if @data.nil?
|
|
106
|
+
return false if @pagination.nil?
|
|
107
|
+
true
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
# Custom attribute writer method with validation
|
|
111
|
+
# @param [Object] data Value to be assigned
|
|
112
|
+
def data=(data)
|
|
113
|
+
if data.nil?
|
|
114
|
+
fail ArgumentError, 'data cannot be nil'
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
@data = data
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
# Custom attribute writer method with validation
|
|
121
|
+
# @param [Object] pagination Value to be assigned
|
|
122
|
+
def pagination=(pagination)
|
|
123
|
+
if pagination.nil?
|
|
124
|
+
fail ArgumentError, 'pagination cannot be nil'
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
@pagination = pagination
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
# Checks equality by comparing each attribute.
|
|
131
|
+
# @param [Object] Object to be compared
|
|
132
|
+
def ==(o)
|
|
133
|
+
return true if self.equal?(o)
|
|
134
|
+
self.class == o.class &&
|
|
135
|
+
data == o.data &&
|
|
136
|
+
pagination == o.pagination
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
# @see the `==` method
|
|
140
|
+
# @param [Object] Object to be compared
|
|
141
|
+
def eql?(o)
|
|
142
|
+
self == o
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
# Calculates hash code according to all attributes.
|
|
146
|
+
# @return [Integer] Hash code
|
|
147
|
+
def hash
|
|
148
|
+
[data, pagination].hash
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
# Builds the object from hash
|
|
152
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
153
|
+
# @return [Object] Returns the model itself
|
|
154
|
+
def self.build_from_hash(attributes)
|
|
155
|
+
return nil unless attributes.is_a?(Hash)
|
|
156
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
157
|
+
transformed_hash = {}
|
|
158
|
+
openapi_types.each_pair do |key, type|
|
|
159
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
160
|
+
transformed_hash["#{key}"] = nil
|
|
161
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
162
|
+
# check to ensure the input is an array given that the attribute
|
|
163
|
+
# is documented as an array but the input is not
|
|
164
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
165
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
166
|
+
end
|
|
167
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
168
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
169
|
+
end
|
|
170
|
+
end
|
|
171
|
+
new(transformed_hash)
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
# Returns the object in the form of hash
|
|
175
|
+
# @return [Hash] Returns the object in the form of hash
|
|
176
|
+
def to_hash
|
|
177
|
+
hash = {}
|
|
178
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
179
|
+
value = self.send(attr)
|
|
180
|
+
if value.nil?
|
|
181
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
182
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
183
|
+
end
|
|
184
|
+
|
|
185
|
+
hash[param] = _to_hash(value)
|
|
186
|
+
end
|
|
187
|
+
hash
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
end
|