Skip to content

Instantly share code, notes, and snippets.

@simistern
Created November 20, 2020 16:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save simistern/053ca741c0eb4c19d3a4d5b36e02c20d to your computer and use it in GitHub Desktop.
Save simistern/053ca741c0eb4c19d3a4d5b36e02c20d to your computer and use it in GitHub Desktop.
const ketting = new Ketting('https://api.example.org/');
const createArticle = await ketting.follow('articleCollection').follow('new'); // chained follow
const newArticle = await createArticle.post({ title: 'Hello world' });
const author = await newArticle.follow('author');
// Output author information
console.log(await author.get());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment