Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dropped isomorphic fetch #5

Merged
merged 1 commit into from
Sep 26, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
{
"name": "indeed-api-client",
"version": "1.1.0",
"version": "1.2.0",
"description": "A client library for connecting to the Indeed API",
"main": "./dist/index.js",
"babel": {
"presets": [
"es2015"
]
"presets": ["es2015"]
},
"scripts": {
"start": "npm-run-all --parallel dev lint:watch",
"dev": "webpack-dev-server -d --history-api-fallback --inline --progress --colors --port 4200 --config webpack.config.dev.babel.js",
"dev":
"webpack-dev-server -d --history-api-fallback --inline --progress --colors --port 4200 --config webpack.config.dev.babel.js",
"lint": "node_modules/.bin/esw webpack.config.* src tools --color",
"lint:watch": "npm run lint -- --watch",
"test": "./node_modules/.bin/mocha --harmony-proxies --compilers js:babel-core/register",
"test":
"./node_modules/.bin/mocha --harmony-proxies --compilers js:babel-core/register",
"test:watch": "npm run test -- --watch",
"clean-dist": "npm run remove-dist && mkdir dist",
"remove-dist": "rm -rf ./dist",
Expand All @@ -24,7 +24,8 @@
"author": "thedrew12",
"license": "MIT",
"dependencies": {
"isomorphic-fetch": "^2.2.1",
"es6-promise": "^4.1.1",
"fetch-everywhere": "^1.0.5",
"query-string": "^4.2.2"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions src/http.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import fetch from 'isomorphic-fetch';
import fetch from 'fetch-everywhere';

/**
* Gets the data.
Expand All @@ -7,5 +7,5 @@ import fetch from 'isomorphic-fetch';
* @param {array} params The Indeed API params
*/
export function getData(url) {
return fetch(url).then(response => response.json());
return fetch(url).then(response => response.json());
}
14 changes: 7 additions & 7 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import jobSearch from './jobSearch';

export default function Indeed(url = 'http://api.indeed.com/ads', publisherId) {
if (!publisherId) {
throw Error('An Indeed publisher id is required');
} else {
return {
jobSearch: () => new jobSearch(url, publisherId)
};
}
if (!publisherId) {
throw Error('An Indeed publisher id is required');
} else {
return {
jobSearch: () => new jobSearch(url, publisherId)
};
}
}