Total Complexity | 3 |
Complexity/F | 1 |
Lines of Code | 17 |
Function Count | 3 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | import App from "app"; |
||
2 | |||
3 | function Movies() { |
||
4 | this.serviceName = "Movies"; |
||
5 | this.basepath = "//www.omdbapi.com/"; |
||
6 | |||
7 | this.Request = App.ServicesContainer.get("AJAX"); |
||
8 | this.EM = App.EventManager; |
||
9 | } |
||
10 | |||
11 | Movies.prototype.search = function (term, onSuccess, onError) { |
||
12 | this.Request.send('get', this.basepath, {s: term}, function (res) { |
||
13 | onSuccess(res.body.Search || []); |
||
14 | }, onError); |
||
15 | } |
||
16 | |||
17 | export default Movies; |
||
18 |