-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f9c283b
commit 778aaf6
Showing
9 changed files
with
147 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "rsky-feedgen" | ||
version = "0.0.1" | ||
version = "0.1.0" | ||
authors = ["Rudy Fraser <[email protected]>"] | ||
description = "A framework for building AT Protocol feed generators, in Rust." | ||
license = "Apache-2.0" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
-- This file should undo anything in `up.sql` | ||
DROP TABLE public.video; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
-- Your SQL goes here | ||
CREATE TABLE IF NOT EXISTS public.video ( | ||
cid character varying NOT NULL, | ||
alt character varying, | ||
"postCid" character varying NOT NULL, | ||
"postUri" character varying NOT NULL, | ||
"createdAt" character varying NOT NULL, | ||
"indexedAt" character varying NOT NULL, | ||
labels TEXT [] | ||
); | ||
|
||
ALTER TABLE ONLY public.video | ||
DROP CONSTRAINT IF EXISTS video_pkey; | ||
ALTER TABLE ONLY public.video | ||
ADD CONSTRAINT video_pkey PRIMARY KEY (cid); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "rsky-firehose" | ||
version = "0.0.1" | ||
version = "0.1.0" | ||
authors = ["Rudy Fraser <[email protected]>"] | ||
description = "A framework for subscribing to the AT Protocol firehose, in Rust." | ||
license = "Apache-2.0" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
use crate::app::bsky::embed::images::AspectRatio; | ||
use crate::com::atproto::repo::Blob; | ||
|
||
#[derive(Debug, Clone, PartialEq, Deserialize, Serialize)] | ||
#[serde(rename_all = "camelCase")] | ||
pub struct Video { | ||
pub video: Blob, | ||
pub captions: Option<Vec<Caption>>, | ||
/// Alt text description of video image, for accessibility | ||
pub alt: Option<String>, | ||
pub aspect_ratio: Option<AspectRatio>, | ||
} | ||
|
||
|
||
#[derive(Debug, Clone, PartialEq, Deserialize, Serialize)] | ||
pub struct Caption { | ||
pub lang: String, | ||
pub file: Blob, | ||
} | ||
|
||
#[derive(Debug, Clone, PartialEq, Deserialize, Serialize)] | ||
#[serde(tag = "$type")] | ||
#[serde(rename = "app.bsky.embed.video#view")] | ||
#[serde(rename_all = "camelCase")] | ||
pub struct View { | ||
pub cid: String, | ||
pub playlist: String, | ||
pub thumbnail: Option<String>, | ||
pub alt: Option<String>, | ||
pub aspect_ratio: Option<AspectRatio> | ||
} |