From b0cb9ac5ae5eef92f1c0199fd848a78f3afb3ab3 Mon Sep 17 00:00:00 2001 From: Offray Luna Date: Fri, 6 Jan 2023 19:59:04 -0500 Subject: [PATCH] Semantic versioning and starting API implementation. --- .../BaselineOfVideoWeb.class.st | 5 +++++ app/VideoWeb/Invidious.class.st | 20 +++++++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/app/BaselineOfVideoWeb/BaselineOfVideoWeb.class.st b/app/BaselineOfVideoWeb/BaselineOfVideoWeb.class.st index 592b687..bd67e0d 100644 --- a/app/BaselineOfVideoWeb/BaselineOfVideoWeb.class.st +++ b/app/BaselineOfVideoWeb/BaselineOfVideoWeb.class.st @@ -13,3 +13,8 @@ BaselineOfVideoWeb >> baseline: spec [ spec package: 'VideoWeb' ] ] + +{ #category : #accessing } +BaselineOfVideoWeb >> semanticVersion [ + ^ '0.1.0' +] diff --git a/app/VideoWeb/Invidious.class.st b/app/VideoWeb/Invidious.class.st index b0a25b2..4c9e2e2 100644 --- a/app/VideoWeb/Invidious.class.st +++ b/app/VideoWeb/Invidious.class.st @@ -58,6 +58,15 @@ Invidious class >> responseTimes [ collect: [:assoc | assoc ] ] +{ #category : #accessing } +Invidious class >> storeConfiguration [ + + | configFolder | + configFolder := (FileLocator userData / 'Mutabit' / 'VideoWeb') ensureCreateDirectory. + MarkupFile exportAsFileOn: configFolder / 'config.ston' containing: ( STON toStringPretty: self defaultInstance ). + ^ configFolder / 'config.ston' +] + { #category : #accessing } Invidious >> api [ ^ api @@ -68,6 +77,17 @@ Invidious >> api: booleanValue [ api := booleanValue. ] +{ #category : #accessing } +Invidious >> authorIdForVideo: aString [ +] + +{ #category : #accessing } +Invidious >> channel: authorId [ + | queryURL | + queryURL := self uri asString, 'api/v1/channels/', authorId . + ^ STONJSON fromString: queryURL asUrl retrieveContents +] + { #category : #accessing } Invidious >> fromDictionary: aDictionary [ | rawMonitor|