Skip to content
This repository was archived by the owner on Dec 23, 2017. It is now read-only.

Commit dd793f0

Browse files
committed
feat(Connector): add API url + tests
1 parent ce76264 commit dd793f0

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

src/connector.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
import { GraphQLConnector } from '@gramps/gramps-express';
22

3-
// TODO: change `YourDataSourceConnector` to a descriptive name
4-
export default class YourDataSourceConnector extends GraphQLConnector {
3+
export default class IMDBAPIConnector extends GraphQLConnector {
54
/**
6-
* TODO: describe this API endpoint
5+
* API for looking up movie info
76
* @member {string}
87
*/
9-
apiBaseUri = `https://example.org/v2`;
8+
apiBaseUri = `https://www.theimdbapi.org/api`;
109
}

test/connector.test.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { GraphQLConnector } from '@gramps/gramps-express';
22
import Connector from '../src/connector';
33

44
// TODO: Update the data source name.
5-
const DATA_SOURCE_NAME = 'YourDataSource';
5+
const DATA_SOURCE_NAME = 'IMDBAPI';
66
const connector = new Connector();
77

88
describe(`${DATA_SOURCE_NAME}Connector`, () => {
@@ -11,7 +11,6 @@ describe(`${DATA_SOURCE_NAME}Connector`, () => {
1111
});
1212

1313
it('uses the appropriate URL', () => {
14-
// TODO: Update the data source API endpoint.
15-
expect(connector.apiBaseUri).toBe(`https://example.org/v2`);
14+
expect(connector.apiBaseUri).toBe(`https://www.theimdbapi.org/api`);
1615
});
1716
});

0 commit comments

Comments
 (0)