Skip to content

Commit 71ce897

Browse files
committed
contacts: readGroup example & changelog entry
1 parent 83c4de4 commit 71ce897

2 files changed

Lines changed: 11 additions & 0 deletions

File tree

contacts/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
99
### Added
1010

1111
- [createNewGroup](https://solid-contrib.github.io/data-modules/contacts-rdflib-api/interfaces/ContactsModule.html#createNewGroup)
12+
- [readGroup](https://solid-contrib.github.io/data-modules/contacts-rdflib-api/interfaces/ContactsModule.html#readGroup)
1213

1314
## 0.2.1
1415

contacts/examples/read-group.mjs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import {ContactsModuleRdfLib as ContactsModule} from '../dist/index.js';
2+
import {Fetcher, graph, UpdateManager} from "rdflib";
3+
4+
const store = graph()
5+
const fetcher = new Fetcher(store)
6+
const updater = new UpdateManager(store)
7+
const contacts = new ContactsModule({store, fetcher, updater})
8+
9+
const result = await contacts.readGroup("http://localhost:3000/alice/public-contacts/Group/officials.ttl#this")
10+
console.log(result)

0 commit comments

Comments
 (0)