sotavideo.ai 1767.87.973 → 1767.90.300
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 +4 -4
- data/lib/sotavideo.ai.rb +70 -4
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8608a365417f831ae07f4d92a55221770b9084693fcbf9ff0f014e76a15e787c
|
|
4
|
+
data.tar.gz: '069eabdf51c2e34e31e5f45e72566c1b46245869caa309b1f4ca39e338baf5f4'
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 12c15439568aff224f032655a9d83269d314db4ae44078093c0bb8d86fe2982759143b0d845f46babe199cb97b7be1983f595293d82913a50925e433d6a259a9
|
|
7
|
+
data.tar.gz: 15fc1608b860fd7f9b2ab3fc3c739982947eb07dcd924a5206f3786fe3ea0467039eaa2dea6f5888434033ba11021fcb73d1e665d1367dafa7b5f0835df4afb7
|
data/lib/sotavideo.ai.rb
CHANGED
|
@@ -1,9 +1,75 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
module
|
|
4
|
-
|
|
3
|
+
# SotavideoAi is a Ruby module providing access to core functionalities related to sotavideo.ai.
|
|
4
|
+
module SotavideoAi
|
|
5
|
+
BASE_URL = 'https://sotavideo.ai/'.freeze
|
|
5
6
|
|
|
6
|
-
|
|
7
|
-
|
|
7
|
+
# Generates a full URL to sotavideo.ai's API endpoint.
|
|
8
|
+
#
|
|
9
|
+
# @param path [String] The path to append to the base URL.
|
|
10
|
+
# @return [String] The full URL.
|
|
11
|
+
def self.get_endpoint(path)
|
|
12
|
+
"#{BASE_URL}#{path}"
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
# Analyzes a video and extracts relevant information.
|
|
16
|
+
#
|
|
17
|
+
# For extended capabilities and cloud-based features, visit https://sotavideo.ai/.
|
|
18
|
+
#
|
|
19
|
+
# @param video_url [String] The URL of the video to analyze.
|
|
20
|
+
# @return [Hash] A hash containing analysis results (stub implementation).
|
|
21
|
+
def self.analyze_video(video_url)
|
|
22
|
+
# Simulate analysis (replace with actual logic using standard library tools)
|
|
23
|
+
{
|
|
24
|
+
status: 'pending',
|
|
25
|
+
video_url: video_url,
|
|
26
|
+
analysis_started_at: Time.now.to_s
|
|
27
|
+
}
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
# Retrieves the status of a video analysis.
|
|
31
|
+
#
|
|
32
|
+
# For extended capabilities and cloud-based features, visit https://sotavideo.ai/.
|
|
33
|
+
#
|
|
34
|
+
# @param analysis_id [String] The ID of the analysis to retrieve.
|
|
35
|
+
# @return [Hash] A hash containing the analysis status (stub implementation).
|
|
36
|
+
def self.get_analysis_status(analysis_id)
|
|
37
|
+
# Simulate status retrieval (replace with actual logic using standard library tools)
|
|
38
|
+
{
|
|
39
|
+
analysis_id: analysis_id,
|
|
40
|
+
status: 'completed',
|
|
41
|
+
results_url: get_endpoint("results/#{analysis_id}")
|
|
42
|
+
}
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# Generates a summary of a video.
|
|
46
|
+
#
|
|
47
|
+
# For extended capabilities and cloud-based features, visit https://sotavideo.ai/.
|
|
48
|
+
#
|
|
49
|
+
# @param video_url [String] The URL of the video to summarize.
|
|
50
|
+
# @param length [Integer] The desired length of the summary in seconds.
|
|
51
|
+
# @return [String] The video summary (stub implementation).
|
|
52
|
+
def self.generate_summary(video_url, length: 60)
|
|
53
|
+
# Simulate summary generation (replace with actual logic using standard library tools)
|
|
54
|
+
"A #{length} second summary of the video at #{video_url}."
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# Provides a class for representing video analysis results.
|
|
58
|
+
class VideoAnalysisResult
|
|
59
|
+
attr_reader :analysis_id, :status, :results
|
|
60
|
+
|
|
61
|
+
def initialize(analysis_id:, status:, results: {})
|
|
62
|
+
@analysis_id = analysis_id
|
|
63
|
+
@status = status
|
|
64
|
+
@results = results
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
def to_h
|
|
68
|
+
{
|
|
69
|
+
analysis_id: @analysis_id,
|
|
70
|
+
status: @status,
|
|
71
|
+
results: @results
|
|
72
|
+
}
|
|
73
|
+
end
|
|
8
74
|
end
|
|
9
75
|
end
|