ninjapear 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +154 -0
- package/dist/ApiClient.js +703 -0
- package/dist/api/CompanyAPIApi.js +86 -0
- package/dist/api/ContactAPIApi.js +87 -0
- package/dist/api/CustomerAPIApi.js +99 -0
- package/dist/api/MetaAPIApi.js +79 -0
- package/dist/index.js +76 -0
- package/dist/model/CreditBalanceResponse.js +86 -0
- package/dist/model/CustomerCompany.js +190 -0
- package/dist/model/CustomerListingResponse.js +184 -0
- package/dist/model/DisposableEmailResponse.js +108 -0
- package/dist/model/Error.js +90 -0
- package/package.json +63 -0
package/README.md
ADDED
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
# ninjapear
|
|
2
|
+
|
|
3
|
+
NinjaPear - JavaScript client for ninjapear
|
|
4
|
+
NinjaPear is a data platform that seeks to serve as the single source of truth for B2B data, be it to power your data-driven applications or your sales-driven workflow.
|
|
5
|
+
|
|
6
|
+
As a data client of NinjaPear API, you can:
|
|
7
|
+
1. Look up the customers, investors, and partners/platforms of any business globally.
|
|
8
|
+
2. (FREE) Retrieve the logo of any company.
|
|
9
|
+
3. (FREE) Find out the nature of an email address.
|
|
10
|
+
4. (FREE) Check your credit balance.
|
|
11
|
+
This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
|
12
|
+
|
|
13
|
+
- API version: 1.0.0
|
|
14
|
+
- Package version: 1.0.0
|
|
15
|
+
- Generator version: 7.19.0
|
|
16
|
+
- Build package: org.openapitools.codegen.languages.JavascriptClientCodegen
|
|
17
|
+
|
|
18
|
+
## Installation
|
|
19
|
+
|
|
20
|
+
### For [Node.js](https://nodejs.org/)
|
|
21
|
+
|
|
22
|
+
#### npm
|
|
23
|
+
|
|
24
|
+
To publish the library as a [npm](https://www.npmjs.com/), please follow the procedure in ["Publishing npm packages"](https://docs.npmjs.com/getting-started/publishing-npm-packages).
|
|
25
|
+
|
|
26
|
+
Then install it via:
|
|
27
|
+
|
|
28
|
+
```shell
|
|
29
|
+
npm install ninjapear --save
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Finally, you need to build the module:
|
|
33
|
+
|
|
34
|
+
```shell
|
|
35
|
+
npm run build
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
##### Local development
|
|
39
|
+
|
|
40
|
+
To use the library locally without publishing to a remote npm registry, first install the dependencies by changing into the directory containing `package.json` (and this README). Let's call this `JAVASCRIPT_CLIENT_DIR`. Then run:
|
|
41
|
+
|
|
42
|
+
```shell
|
|
43
|
+
npm install
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Next, [link](https://docs.npmjs.com/cli/link) it globally in npm with the following, also from `JAVASCRIPT_CLIENT_DIR`:
|
|
47
|
+
|
|
48
|
+
```shell
|
|
49
|
+
npm link
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
To use the link you just defined in your project, switch to the directory you want to use your ninjapear from, and run:
|
|
53
|
+
|
|
54
|
+
```shell
|
|
55
|
+
npm link /path/to/<JAVASCRIPT_CLIENT_DIR>
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Finally, you need to build the module:
|
|
59
|
+
|
|
60
|
+
```shell
|
|
61
|
+
npm run build
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
#### git
|
|
65
|
+
|
|
66
|
+
If the library is hosted at a git repository, e.g.https://github.com/GIT_USER_ID/GIT_REPO_ID
|
|
67
|
+
then install it via:
|
|
68
|
+
|
|
69
|
+
```shell
|
|
70
|
+
npm install GIT_USER_ID/GIT_REPO_ID --save
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### For browser
|
|
74
|
+
|
|
75
|
+
The library also works in the browser environment via npm and [browserify](http://browserify.org/). After following
|
|
76
|
+
the above steps with Node.js and installing browserify with `npm install -g browserify`,
|
|
77
|
+
perform the following (assuming *main.js* is your entry file):
|
|
78
|
+
|
|
79
|
+
```shell
|
|
80
|
+
browserify main.js > bundle.js
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Then include *bundle.js* in the HTML pages.
|
|
84
|
+
|
|
85
|
+
### Webpack Configuration
|
|
86
|
+
|
|
87
|
+
Using Webpack you may encounter the following error: "Module not found: Error:
|
|
88
|
+
Cannot resolve module", most certainly you should disable AMD loader. Add/merge
|
|
89
|
+
the following section to your webpack config:
|
|
90
|
+
|
|
91
|
+
```javascript
|
|
92
|
+
module: {
|
|
93
|
+
rules: [
|
|
94
|
+
{
|
|
95
|
+
parser: {
|
|
96
|
+
amd: false
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
]
|
|
100
|
+
}
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
## Getting Started
|
|
104
|
+
|
|
105
|
+
Please follow the [installation](#installation) instruction and execute the following JS code:
|
|
106
|
+
|
|
107
|
+
```javascript
|
|
108
|
+
var NinjaPear = require('ninjapear');
|
|
109
|
+
|
|
110
|
+
var defaultClient = NinjaPear.ApiClient.instance;
|
|
111
|
+
// Configure Bearer access token for authorization: bearerAuth
|
|
112
|
+
var bearerAuth = defaultClient.authentications['bearerAuth'];
|
|
113
|
+
bearerAuth.accessToken = "YOUR ACCESS TOKEN"
|
|
114
|
+
|
|
115
|
+
var api = new NinjaPear.CompanyAPIApi()
|
|
116
|
+
var website = "https://www.stripe.com"; // {String} The website URL of the target company
|
|
117
|
+
api.getCompanyLogo(website).then(function(data) {
|
|
118
|
+
console.log('API called successfully. Returned data: ' + data);
|
|
119
|
+
}, function(error) {
|
|
120
|
+
console.error(error);
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
## Documentation for API Endpoints
|
|
127
|
+
|
|
128
|
+
All URIs are relative to *https://nubela.co*
|
|
129
|
+
|
|
130
|
+
Class | Method | HTTP request | Description
|
|
131
|
+
------------ | ------------- | ------------- | -------------
|
|
132
|
+
*NinjaPear.CompanyAPIApi* | [**getCompanyLogo**](docs/CompanyAPIApi.md#getCompanyLogo) | **GET** /api/v1/company/logo | Company Logo
|
|
133
|
+
*NinjaPear.ContactAPIApi* | [**checkDisposableEmail**](docs/ContactAPIApi.md#checkDisposableEmail) | **GET** /api/v1/contact/disposable-email | Disposable Email Checker
|
|
134
|
+
*NinjaPear.CustomerAPIApi* | [**getCustomerListing**](docs/CustomerAPIApi.md#getCustomerListing) | **GET** /api/v1/customer/listing | Customer Listing
|
|
135
|
+
*NinjaPear.MetaAPIApi* | [**getCreditBalance**](docs/MetaAPIApi.md#getCreditBalance) | **GET** /api/v1/meta/credit-balance | View Credit Balance
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
## Documentation for Models
|
|
139
|
+
|
|
140
|
+
- [NinjaPear.CreditBalanceResponse](docs/CreditBalanceResponse.md)
|
|
141
|
+
- [NinjaPear.CustomerCompany](docs/CustomerCompany.md)
|
|
142
|
+
- [NinjaPear.CustomerListingResponse](docs/CustomerListingResponse.md)
|
|
143
|
+
- [NinjaPear.DisposableEmailResponse](docs/DisposableEmailResponse.md)
|
|
144
|
+
- [NinjaPear.Error](docs/Error.md)
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
## Documentation for Authorization
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
Authentication schemes defined for the API:
|
|
151
|
+
### bearerAuth
|
|
152
|
+
|
|
153
|
+
- **Type**: Bearer authentication
|
|
154
|
+
|