We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3530d99 commit 3756f53Copy full SHA for 3756f53
src/adapters/PeopleAdapter.js
@@ -0,0 +1,20 @@
1
+import {throwError} from 'rxjs';
2
+
3
+/**
4
+ * This is a base class that defines the interface that maps people data.
5
+ * Developers that want to extend `PeopleAdapter` must implement all of its methods,
6
+ * adhering to the exact parameters and structure of the returned objects
7
+ */
8
+export default class PeopleAdapter {
9
+ /**
10
+ * Returns an observable that emits person data
11
+ *
12
+ * @param {String} id - ID of person to get
13
+ * @returns {Observable<PersonObject>}
14
+ * @memberof PeopleAdapter
15
16
+ // eslint-disable-next-line no-unused-vars
17
+ getPerson(id) {
18
+ return throwError(new Error('getPerson(id) must be defined in PeopleAdapter'));
19
+ }
20
+}
0 commit comments