Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cloudmersive-image-api-client

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cloudmersive-image-api-client - npm Package Compare versions

Comparing version 1.0.8 to 1.0.9

docs/ArtisticApi.md

4

docs/NsfwApi.md

@@ -7,3 +7,3 @@ # CloudmersiveImageApiClient.NsfwApi

------------- | ------------- | -------------
[**nsfwClassify**](NsfwApi.md#nsfwClassify) | **POST** /image/nsfw/classify | NSFW image classifier
[**nsfwClassify**](NsfwApi.md#nsfwClassify) | **POST** /image/nsfw/classify | Not safe for work (NSFW) racy content classification

@@ -15,3 +15,3 @@

NSFW image classifier
Not safe for work (NSFW) racy content classification

@@ -18,0 +18,0 @@ Classify an image into Not Safe For Work (NSFW)/Porn/Racy content and Safe Content.

@@ -8,2 +8,4 @@ # CloudmersiveImageApiClient.RecognizeApi

[**recognizeDescribe**](RecognizeApi.md#recognizeDescribe) | **POST** /image/recognize/describe | Describe an image in natural language
[**recognizeDetectObjects**](RecognizeApi.md#recognizeDetectObjects) | **POST** /image/recognize/detect-objects | Detect objects, including types and locations, in an image
[**recognizeDetectPeople**](RecognizeApi.md#recognizeDetectPeople) | **POST** /image/recognize/detect-people | Detect people, including locations, in an image

@@ -64,1 +66,107 @@

<a name="recognizeDetectObjects"></a>
# **recognizeDetectObjects**
> ObjectDetectionResult recognizeDetectObjects(imageFile)
Detect objects, including types and locations, in an image
Identify the position, size and description of objects in an image, along with a recognition confidence level. Detects both human people and objects in an image.
### Example
```javascript
var CloudmersiveImageApiClient = require('cloudmersive-image-api-client');
var defaultClient = CloudmersiveImageApiClient.ApiClient.instance;
// Configure API key authorization: Apikey
var Apikey = defaultClient.authentications['Apikey'];
Apikey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Apikey.apiKeyPrefix = 'Token';
var apiInstance = new CloudmersiveImageApiClient.RecognizeApi();
var imageFile = "/path/to/file.txt"; // File | Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.recognizeDetectObjects(imageFile, callback);
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**imageFile** | **File**| Image file to perform the operation on. Common file formats such as PNG, JPEG are supported. |
### Return type
[**ObjectDetectionResult**](ObjectDetectionResult.md)
### Authorization
[Apikey](../README.md#Apikey)
### HTTP request headers
- **Content-Type**: multipart/form-data
- **Accept**: application/json, text/json, application/xml, text/xml
<a name="recognizeDetectPeople"></a>
# **recognizeDetectPeople**
> ObjectDetectionResult recognizeDetectPeople(imageFile)
Detect people, including locations, in an image
Identify the position, and size of human people in an image, along with a recognition confidence level. People in the image do NOT need to be facing the camera; they can be facing away, edge-on, etc.
### Example
```javascript
var CloudmersiveImageApiClient = require('cloudmersive-image-api-client');
var defaultClient = CloudmersiveImageApiClient.ApiClient.instance;
// Configure API key authorization: Apikey
var Apikey = defaultClient.authentications['Apikey'];
Apikey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Apikey.apiKeyPrefix = 'Token';
var apiInstance = new CloudmersiveImageApiClient.RecognizeApi();
var imageFile = "/path/to/file.txt"; // File | Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.recognizeDetectPeople(imageFile, callback);
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**imageFile** | **File**| Image file to perform the operation on. Common file formats such as PNG, JPEG are supported. |
### Return type
[**ObjectDetectionResult**](ObjectDetectionResult.md)
### Authorization
[Apikey](../README.md#Apikey)
### HTTP request headers
- **Content-Type**: multipart/form-data
- **Accept**: application/json, text/json, application/xml, text/xml
{
"name": "cloudmersive-image-api-client",
"version": "1.0.8",
"version": "1.0.9",
"description": "Image_Recognition_and_Processing_APIs_let_you_use_Machine_Learning_to_recognize_and_process_images_and_also_perform_useful_image_modification_operations_",

@@ -5,0 +5,0 @@ "license": "Unlicense",

@@ -8,3 +8,3 @@ # cloudmersive-image-api-client

- API version: v1
- Package version: 1.0.8
- Package version: 1.0.9
- Build package: io.swagger.codegen.languages.JavascriptClientCodegen

@@ -107,4 +107,6 @@

var api = new CloudmersiveImageApiClient.FaceApi()
var api = new CloudmersiveImageApiClient.ArtisticApi()
var style = "style_example"; // {String} The style of the painting to apply. To start, try \"udnie\" a modernist\" painting style. Possible values are: \"udnie\", \"wave\", \"la_muse\", \"rain_princess\".
var imageFile = "/path/to/file.txt"; // {File} Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.

@@ -120,3 +122,3 @@

};
api.faceCropFirst(imageFile, callback);
api.artisticPainting(style, imageFile, callback);

@@ -131,7 +133,13 @@ ```

------------ | ------------- | ------------- | -------------
*CloudmersiveImageApiClient.ArtisticApi* | [**artisticPainting**](docs/ArtisticApi.md#artisticPainting) | **POST** /image/artistic/painting/{style} | Transform an image into an artistic painting automatically
*CloudmersiveImageApiClient.EditApi* | [**editCompositeBasic**](docs/EditApi.md#editCompositeBasic) | **POST** /image/edit/composite/{location} | Composite two images together
*CloudmersiveImageApiClient.EditApi* | [**editDrawRectangle**](docs/EditApi.md#editDrawRectangle) | **POST** /image/edit/draw/rectangle | Draw rectangle onto an image
*CloudmersiveImageApiClient.EditApi* | [**editDrawText**](docs/EditApi.md#editDrawText) | **POST** /image/edit/draw/text | Draw text onto an image
*CloudmersiveImageApiClient.FaceApi* | [**faceCropFirst**](docs/FaceApi.md#faceCropFirst) | **POST** /image/face/crop/first | Crop image to face (square)
*CloudmersiveImageApiClient.FaceApi* | [**faceCropFirstRound**](docs/FaceApi.md#faceCropFirstRound) | **POST** /image/face/crop/first/round | Crop image to face (round)
*CloudmersiveImageApiClient.FaceApi* | [**faceLocate**](docs/FaceApi.md#faceLocate) | **POST** /image/face/locate | Find faces in an image
*CloudmersiveImageApiClient.NsfwApi* | [**nsfwClassify**](docs/NsfwApi.md#nsfwClassify) | **POST** /image/nsfw/classify | NSFW image classifier
*CloudmersiveImageApiClient.NsfwApi* | [**nsfwClassify**](docs/NsfwApi.md#nsfwClassify) | **POST** /image/nsfw/classify | Not safe for work (NSFW) racy content classification
*CloudmersiveImageApiClient.RecognizeApi* | [**recognizeDescribe**](docs/RecognizeApi.md#recognizeDescribe) | **POST** /image/recognize/describe | Describe an image in natural language
*CloudmersiveImageApiClient.RecognizeApi* | [**recognizeDetectObjects**](docs/RecognizeApi.md#recognizeDetectObjects) | **POST** /image/recognize/detect-objects | Detect objects, including types and locations, in an image
*CloudmersiveImageApiClient.RecognizeApi* | [**recognizeDetectPeople**](docs/RecognizeApi.md#recognizeDetectPeople) | **POST** /image/recognize/detect-people | Detect people, including locations, in an image
*CloudmersiveImageApiClient.ResizeApi* | [**resizePost**](docs/ResizeApi.md#resizePost) | **POST** /image/resize/preserveAspectRatio/{maxWidth}/{maxHeight} | Resize an image with parameters

@@ -142,2 +150,7 @@

- [CloudmersiveImageApiClient.DetectedObject](docs/DetectedObject.md)
- [CloudmersiveImageApiClient.DrawRectangleInstance](docs/DrawRectangleInstance.md)
- [CloudmersiveImageApiClient.DrawRectangleRequest](docs/DrawRectangleRequest.md)
- [CloudmersiveImageApiClient.DrawTextInstance](docs/DrawTextInstance.md)
- [CloudmersiveImageApiClient.DrawTextRequest](docs/DrawTextRequest.md)
- [CloudmersiveImageApiClient.Face](docs/Face.md)

@@ -147,2 +160,3 @@ - [CloudmersiveImageApiClient.FaceLocateResponse](docs/FaceLocateResponse.md)

- [CloudmersiveImageApiClient.NsfwResult](docs/NsfwResult.md)
- [CloudmersiveImageApiClient.ObjectDetectionResult](docs/ObjectDetectionResult.md)
- [CloudmersiveImageApiClient.RecognitionOutcome](docs/RecognitionOutcome.md)

@@ -149,0 +163,0 @@

@@ -36,3 +36,3 @@ /**

* @module api/FaceApi
* @version 1.0.8
* @version 1.0.9
*/

@@ -39,0 +39,0 @@

@@ -36,3 +36,3 @@ /**

* @module api/NsfwApi
* @version 1.0.8
* @version 1.0.9
*/

@@ -60,3 +60,3 @@

/**
* NSFW image classifier
* Not safe for work (NSFW) racy content classification
* Classify an image into Not Safe For Work (NSFW)/Porn/Racy content and Safe Content.

@@ -63,0 +63,0 @@ * @param {File} imageFile Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.

@@ -19,6 +19,6 @@ /**

// AMD. Register as an anonymous module.
define(['ApiClient', 'model/ImageDescriptionResponse'], factory);
define(['ApiClient', 'model/ImageDescriptionResponse', 'model/ObjectDetectionResult'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
module.exports = factory(require('../ApiClient'), require('../model/ImageDescriptionResponse'));
module.exports = factory(require('../ApiClient'), require('../model/ImageDescriptionResponse'), require('../model/ObjectDetectionResult'));
} else {

@@ -29,5 +29,5 @@ // Browser globals (root is window)

}
root.CloudmersiveImageApiClient.RecognizeApi = factory(root.CloudmersiveImageApiClient.ApiClient, root.CloudmersiveImageApiClient.ImageDescriptionResponse);
root.CloudmersiveImageApiClient.RecognizeApi = factory(root.CloudmersiveImageApiClient.ApiClient, root.CloudmersiveImageApiClient.ImageDescriptionResponse, root.CloudmersiveImageApiClient.ObjectDetectionResult);
}
}(this, function(ApiClient, ImageDescriptionResponse) {
}(this, function(ApiClient, ImageDescriptionResponse, ObjectDetectionResult) {
'use strict';

@@ -38,3 +38,3 @@

* @module api/RecognizeApi
* @version 1.0.8
* @version 1.0.9
*/

@@ -100,2 +100,98 @@

}
/**
* Callback function to receive the result of the recognizeDetectObjects operation.
* @callback module:api/RecognizeApi~recognizeDetectObjectsCallback
* @param {String} error Error message, if any.
* @param {module:model/ObjectDetectionResult} data The data returned by the service call.
* @param {String} response The complete HTTP response.
*/
/**
* Detect objects, including types and locations, in an image
* Identify the position, size and description of objects in an image, along with a recognition confidence level. Detects both human people and objects in an image.
* @param {File} imageFile Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
* @param {module:api/RecognizeApi~recognizeDetectObjectsCallback} callback The callback function, accepting three arguments: error, data, response
* data is of type: {@link module:model/ObjectDetectionResult}
*/
this.recognizeDetectObjects = function(imageFile, callback) {
var postBody = null;
// verify the required parameter 'imageFile' is set
if (imageFile === undefined || imageFile === null) {
throw new Error("Missing the required parameter 'imageFile' when calling recognizeDetectObjects");
}
var pathParams = {
};
var queryParams = {
};
var collectionQueryParams = {
};
var headerParams = {
};
var formParams = {
'imageFile': imageFile
};
var authNames = ['Apikey'];
var contentTypes = ['multipart/form-data'];
var accepts = ['application/json', 'text/json', 'application/xml', 'text/xml'];
var returnType = ObjectDetectionResult;
return this.apiClient.callApi(
'/image/recognize/detect-objects', 'POST',
pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType, callback
);
}
/**
* Callback function to receive the result of the recognizeDetectPeople operation.
* @callback module:api/RecognizeApi~recognizeDetectPeopleCallback
* @param {String} error Error message, if any.
* @param {module:model/ObjectDetectionResult} data The data returned by the service call.
* @param {String} response The complete HTTP response.
*/
/**
* Detect people, including locations, in an image
* Identify the position, and size of human people in an image, along with a recognition confidence level. People in the image do NOT need to be facing the camera; they can be facing away, edge-on, etc.
* @param {File} imageFile Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
* @param {module:api/RecognizeApi~recognizeDetectPeopleCallback} callback The callback function, accepting three arguments: error, data, response
* data is of type: {@link module:model/ObjectDetectionResult}
*/
this.recognizeDetectPeople = function(imageFile, callback) {
var postBody = null;
// verify the required parameter 'imageFile' is set
if (imageFile === undefined || imageFile === null) {
throw new Error("Missing the required parameter 'imageFile' when calling recognizeDetectPeople");
}
var pathParams = {
};
var queryParams = {
};
var collectionQueryParams = {
};
var headerParams = {
};
var formParams = {
'imageFile': imageFile
};
var authNames = ['Apikey'];
var contentTypes = ['multipart/form-data'];
var accepts = ['application/json', 'text/json', 'application/xml', 'text/xml'];
var returnType = ObjectDetectionResult;
return this.apiClient.callApi(
'/image/recognize/detect-people', 'POST',
pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType, callback
);
}
};

@@ -102,0 +198,0 @@

@@ -36,3 +36,3 @@ /**

* @module api/ResizeApi
* @version 1.0.8
* @version 1.0.9
*/

@@ -39,0 +39,0 @@

@@ -35,3 +35,3 @@ /**

* @module ApiClient
* @version 1.0.8
* @version 1.0.9
*/

@@ -38,0 +38,0 @@

@@ -19,8 +19,8 @@ /**

// AMD. Register as an anonymous module.
define(['ApiClient', 'model/Face', 'model/FaceLocateResponse', 'model/ImageDescriptionResponse', 'model/NsfwResult', 'model/RecognitionOutcome', 'api/FaceApi', 'api/NsfwApi', 'api/RecognizeApi', 'api/ResizeApi'], factory);
define(['ApiClient', 'model/DetectedObject', 'model/DrawRectangleInstance', 'model/DrawRectangleRequest', 'model/DrawTextInstance', 'model/DrawTextRequest', 'model/Face', 'model/FaceLocateResponse', 'model/ImageDescriptionResponse', 'model/NsfwResult', 'model/ObjectDetectionResult', 'model/RecognitionOutcome', 'api/ArtisticApi', 'api/EditApi', 'api/FaceApi', 'api/NsfwApi', 'api/RecognizeApi', 'api/ResizeApi'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
module.exports = factory(require('./ApiClient'), require('./model/Face'), require('./model/FaceLocateResponse'), require('./model/ImageDescriptionResponse'), require('./model/NsfwResult'), require('./model/RecognitionOutcome'), require('./api/FaceApi'), require('./api/NsfwApi'), require('./api/RecognizeApi'), require('./api/ResizeApi'));
module.exports = factory(require('./ApiClient'), require('./model/DetectedObject'), require('./model/DrawRectangleInstance'), require('./model/DrawRectangleRequest'), require('./model/DrawTextInstance'), require('./model/DrawTextRequest'), require('./model/Face'), require('./model/FaceLocateResponse'), require('./model/ImageDescriptionResponse'), require('./model/NsfwResult'), require('./model/ObjectDetectionResult'), require('./model/RecognitionOutcome'), require('./api/ArtisticApi'), require('./api/EditApi'), require('./api/FaceApi'), require('./api/NsfwApi'), require('./api/RecognizeApi'), require('./api/ResizeApi'));
}
}(function(ApiClient, Face, FaceLocateResponse, ImageDescriptionResponse, NsfwResult, RecognitionOutcome, FaceApi, NsfwApi, RecognizeApi, ResizeApi) {
}(function(ApiClient, DetectedObject, DrawRectangleInstance, DrawRectangleRequest, DrawTextInstance, DrawTextRequest, Face, FaceLocateResponse, ImageDescriptionResponse, NsfwResult, ObjectDetectionResult, RecognitionOutcome, ArtisticApi, EditApi, FaceApi, NsfwApi, RecognizeApi, ResizeApi) {
'use strict';

@@ -57,3 +57,3 @@

* @module index
* @version 1.0.8
* @version 1.0.9
*/

@@ -67,2 +67,27 @@ var exports = {

/**
* The DetectedObject model constructor.
* @property {module:model/DetectedObject}
*/
DetectedObject: DetectedObject,
/**
* The DrawRectangleInstance model constructor.
* @property {module:model/DrawRectangleInstance}
*/
DrawRectangleInstance: DrawRectangleInstance,
/**
* The DrawRectangleRequest model constructor.
* @property {module:model/DrawRectangleRequest}
*/
DrawRectangleRequest: DrawRectangleRequest,
/**
* The DrawTextInstance model constructor.
* @property {module:model/DrawTextInstance}
*/
DrawTextInstance: DrawTextInstance,
/**
* The DrawTextRequest model constructor.
* @property {module:model/DrawTextRequest}
*/
DrawTextRequest: DrawTextRequest,
/**
* The Face model constructor.

@@ -88,2 +113,7 @@ * @property {module:model/Face}

/**
* The ObjectDetectionResult model constructor.
* @property {module:model/ObjectDetectionResult}
*/
ObjectDetectionResult: ObjectDetectionResult,
/**
* The RecognitionOutcome model constructor.

@@ -94,2 +124,12 @@ * @property {module:model/RecognitionOutcome}

/**
* The ArtisticApi service constructor.
* @property {module:api/ArtisticApi}
*/
ArtisticApi: ArtisticApi,
/**
* The EditApi service constructor.
* @property {module:api/EditApi}
*/
EditApi: EditApi,
/**
* The FaceApi service constructor.

@@ -96,0 +136,0 @@ * @property {module:api/FaceApi}

@@ -39,3 +39,3 @@ /**

* @module model/Face
* @version 1.0.8
* @version 1.0.9
*/

@@ -42,0 +42,0 @@

@@ -39,3 +39,3 @@ /**

* @module model/FaceLocateResponse
* @version 1.0.8
* @version 1.0.9
*/

@@ -42,0 +42,0 @@

@@ -39,3 +39,3 @@ /**

* @module model/ImageDescriptionResponse
* @version 1.0.8
* @version 1.0.9
*/

@@ -42,0 +42,0 @@

@@ -39,3 +39,3 @@ /**

* @module model/NsfwResult
* @version 1.0.8
* @version 1.0.9
*/

@@ -42,0 +42,0 @@

@@ -39,3 +39,3 @@ /**

* @module model/RecognitionOutcome
* @version 1.0.8
* @version 1.0.9
*/

@@ -42,0 +42,0 @@

@@ -63,4 +63,24 @@ /**

});
describe('recognizeDetectObjects', function() {
it('should call recognizeDetectObjects successfully', function(done) {
//uncomment below and update the code to test recognizeDetectObjects
//instance.recognizeDetectObjects(function(error) {
// if (error) throw error;
//expect().to.be();
//});
done();
});
});
describe('recognizeDetectPeople', function() {
it('should call recognizeDetectPeople successfully', function(done) {
//uncomment below and update the code to test recognizeDetectPeople
//instance.recognizeDetectPeople(function(error) {
// if (error) throw error;
//expect().to.be();
//});
done();
});
});
});
}));
SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc