Skip to content
This repository has been archived by the owner on May 14, 2020. It is now read-only.

Retrieve articles from repository #47

Merged
merged 49 commits into from
Nov 29, 2019

Conversation

nlisgo
Copy link
Member

@nlisgo nlisgo commented Nov 22, 2019

This introduces a retrieval process for the article listing to replace the empty hardcoded listing.

src/nodes.ts Outdated Show resolved Hide resolved
@thewilkybarkid thewilkybarkid added the 🆕 Feature A new feature label Nov 22, 2019
src/nodes.ts Outdated Show resolved Hide resolved
src/routes/article-list.ts Outdated Show resolved Hide resolved
src/nodes.ts Outdated Show resolved Hide resolved
src/nodes.ts Outdated Show resolved Hide resolved
src/nodes.ts Outdated Show resolved Hide resolved
src/adaptors/articles.ts Outdated Show resolved Hide resolved
src/routes/article-list.ts Outdated Show resolved Hide resolved
src/adaptors/null-articles.ts Outdated Show resolved Hide resolved
src/router.ts Outdated Show resolved Hide resolved
@@ -0,0 +1,13 @@
import { Iri, JsonLdObj } from 'jsonld/jsonld-spec';

export default interface Articles extends Iterable<JsonLdObj> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Following libero/publisher#346, this should probably be a Store...


async add(node: JsonLdObj): Promise<void> {
if (node['@id'] === undefined) {
throw new InvalidId();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ArticleHasNoId or something? (The ID itself isn't invalid as it doesn't exist.)

@thewilkybarkid thewilkybarkid merged commit 7dec714 into libero:master Nov 29, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🆕 Feature A new feature
Projects
None yet
5 participants