Socket
Socket
Sign inDemoInstall

omdbapi

Package Overview
Dependencies
24
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.0.1 to 3.0.0

12

omdbapi.js
'use strict';
const utils = new (require('./utils.js'))();
module.exports = class OMDB {
constructor(apiKey) {
this.utils = new (require('./utils.js'))(apiKey);
}
module.exports = new class OMDB {
search(opts) {
return utils.get(opts, 'search');
return this.utils.get(opts, 'search');
}
get(opts) {
return utils.get(opts, 'get');
return this.utils.get(opts, 'get');
}
}
};
{
"name": "omdbapi",
"version": "2.0.1",
"version": "3.0.0",
"description": "Omdbapi wrapper for NodeJS",

@@ -17,4 +17,4 @@ "repository": {

"dependencies": {
"got": "6.x.x"
"got": "^9.5.0"
}
}

@@ -14,3 +14,3 @@ # omdbapi

```js
const omdb = require('omdbapi');
const omdb = new (require('omdbapi'))('<your api key>');
```

@@ -47,3 +47,3 @@

Copyright (c) 2016-2017 - vankasteelj <vankasteelj@gmail.com>
Copyright (c) vankasteelj <vankasteelj@gmail.com>

@@ -50,0 +50,0 @@ Permission is hereby granted, free of charge, to any person obtaining a copy

module.exports = class UTILS {
constructor() {
constructor(apiKey) {
if (!apiKey) throw new Error('No apiKey provided');
this.config = require('./config.json');
this.engine = require('got');
this.apiKey = apiKey;
}

@@ -80,3 +83,3 @@

return this.engine(this.config.url + this.build(opts, type), {
return this.engine(this.config.url + this.build(opts, type) + `&apikey=${this.apiKey}`, {
json: true

@@ -94,2 +97,2 @@ }).then(response =>

}
}
};
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc