linvo-api4-client replaced by stremio-api-client

This commit is contained in:
NikolaBorislavovHristov 2018-07-10 20:54:28 +03:00
parent 49ac27edce
commit a724c7202d
6 changed files with 45 additions and 10 deletions

View file

@ -11,7 +11,6 @@
},
"dependencies": {
"classnames": "2.2.6",
"linvo-api4-client": "12.8.0",
"prop-types": "15.6.1",
"react": "16.4.1",
"react-dom": "16.4.1",
@ -20,6 +19,7 @@
"stremio-addon-client": "git+ssh://git@github.com/Stremio/stremio-addon-client.git#v1.5.1",
"stremio-addons": "git+ssh://git@github.com/Stremio/stremio-addons.git#v2.8.14",
"stremio-aggregators": "git+ssh://git@github.com/Stremio/stremio-aggregators.git#v1.4.1",
"stremio-api-client": "git+ssh://git@github.com/Stremio/stremio-api-client.git#e8459d01fdd3507113b13b02aab628d24e20515e",
"stremio-colors": "git+ssh://git@github.com/Stremio/stremio-colors.git#v1.0.0",
"stremio-icons": "git+ssh://git@github.com/Stremio/stremio-icons.git#v1.0.2",
"stremio-json-data": "git+ssh://git@github.com/stremio/stremio-json-data.git#v1.2.3",

6
src/services/API/API.js Normal file
View file

@ -0,0 +1,6 @@
import StremioAPI from 'stremio-api-client';
import storage from './storage';
const API = new StremioAPI({ storage });
export default API;

View file

@ -0,0 +1,3 @@
import API from './API';
export default API;

View file

@ -0,0 +1,21 @@
const storage = {
getUser: function() {
try {
return JSON.parse(localStorage.getItem('user'));
} catch (e) {
return null;
}
},
setUser: function(user) {
try {
if (user === null) {
localStorage.removeItem('user');
} else {
localStorage.setItem('user', JSON.stringify(user));
}
} catch (e) {
}
}
};
export default storage;

View file

@ -1,5 +1,7 @@
import addons from './addons';
import API from './API';
export {
addons
addons,
API
};

View file

@ -2034,7 +2034,11 @@ eventemitter3@^3.0.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-3.1.0.tgz#090b4d6cdbd645ed10bf750d4b5407942d7ba163"
events@1.1.x, events@^1.0.0, events@^1.1.0, events@^1.1.1:
events@1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/events/-/events-1.1.0.tgz#4b389fc200f910742ebff3abb2efe33690f45429"
events@1.1.x, events@^1.0.0, events@^1.1.0:
version "1.1.1"
resolved "https://registry.yarnpkg.com/events/-/events-1.1.1.tgz#9ebdb7635ad099c70dcc4c2a1f5004288e8bd924"
@ -3125,13 +3129,6 @@ less@3.0.4:
request "^2.83.0"
source-map "~0.6.0"
linvo-api4-client@12.8.0:
version "12.8.0"
resolved "https://registry.yarnpkg.com/linvo-api4-client/-/linvo-api4-client-12.8.0.tgz#384382e320a2369bafc37e6c27e40592fa961c2e"
dependencies:
events "^1.1.1"
extend "^3.0.0"
linvo-p2p-sync@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/linvo-p2p-sync/-/linvo-p2p-sync-2.1.0.tgz#437463d94b90e429aa5ea1f083e3498c13c373ef"
@ -5046,6 +5043,12 @@ stremio-addon-linter@^1.2.1:
version "1.4.1"
resolved "git+ssh://git@github.com/Stremio/stremio-aggregators.git#8b3d7980d20b5a8a1ecb16ed4535c942da62f344"
"stremio-api-client@git+ssh://git@github.com/Stremio/stremio-api-client.git#e8459d01fdd3507113b13b02aab628d24e20515e":
version "0.0.1"
resolved "git+ssh://git@github.com/Stremio/stremio-api-client.git#e8459d01fdd3507113b13b02aab628d24e20515e"
dependencies:
events "1.1.0"
"stremio-colors@git+ssh://git@github.com/Stremio/stremio-colors.git#v1.0.0":
version "1.0.0"
resolved "git+ssh://git@github.com/Stremio/stremio-colors.git#4d14e104ada8b9278cc0feed7c71c86fcc876231"