diff options
Diffstat (limited to 'shared/src/commonMain/kotlin/dev/serrahima/lluerna/source/PostSource.kt')
| -rw-r--r-- | shared/src/commonMain/kotlin/dev/serrahima/lluerna/source/PostSource.kt | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/shared/src/commonMain/kotlin/dev/serrahima/lluerna/source/PostSource.kt b/shared/src/commonMain/kotlin/dev/serrahima/lluerna/source/PostSource.kt new file mode 100644 index 0000000..fbf11bc --- /dev/null +++ b/shared/src/commonMain/kotlin/dev/serrahima/lluerna/source/PostSource.kt @@ -0,0 +1,20 @@ +package dev.serrahima.lluerna.source + +import dev.serrahima.lluerna.domain.Post + +/** + * the seam that keeps the ui protocol-agnostic. + * + * v1 implements exactly one source (`StandardSiteSource`). a future + * `BlueskySource` / `WafrnSource` implements this same interface; the ui never + * learns a second protocol. + * + * (shape is tentative — it will settle once the feed milestone lands.) + */ +interface PostSource { + /** a follow-based feed for the given followed publication ids (at-uris). */ + suspend fun feed(followedPublications: List<String>): List<Post> + + /** the full chain ending at [uri], root-first. */ + suspend fun thread(uri: String): List<Post> +} |
