open-index/open-npm huggingface dataset:
npm package: @inzumi/api-client
Description: Client for inzumi API V1
Author: inzumi GmbH
Latest version: 0.5.9

# inzumi Api Client 

```js
//Usage in JavaScript
const inzumi = require('@inzumi/api-client');

//Credentials
const clientCredentials = {
    USERNAME : '<USERNAME>',
    PASSWORD : '<PASSWORD>'   
}

//Mapping (optional)
const clienRequestConfig = {
    MAPPING_OID: '<MAPPING_OID>' 
}

//Initialization
const client = new inzumi.Client(clientCredentials, clienRequestConfig);
```

#  MAPPING example

```js
//Set mapping ID while initialization in clienRequestConfig.MAPPING_OID
const client = new inzumi.Client(clientCredentials, clienRequestConfig);
const mapping = await client.initMapping();

//Set mapping ID manually
const mapping = await client.getMappingData('<MAPPING_OID>');    
```

# MEDIA example 

```js
//Get single media item
const media = await client.API.Media.getMedia('<MEDIA_OID>');
//Get multiple media items
const medias = await client.API.Media.getMedias(['<MEDIA_OID>','<MEDIA_OID>']);
```

# DOCUMENT example 

```js
//Get single document 
const document = await client.API.Document.getDocument('<DOCUMENT_OID>');

//Get multiple documents 
const documents = await client.API.Document.getDocuments(['<DOCUMENT_OID>','<DOCUMENT_OID>']);

//Get document OIDs by geojson
let coordinates = [2.645768, 39.578785];
let radius = 60;
let geojson = {
    geojson: {
        type: "FeatureCollection",
        features: [
            {
                type: "Feature",
                geometry: {
                    type: "Point",
                    coordinates: coordinates
                },
                properties: {
                    radius: radius
                }
            }
        ]
    },
    count: false,
    contentTypes: [
        "GUIDE"
    ]
};
const documentOIDs = await client.API.Search.getDocumentsByGeoShape(geojson);   

//Get documents by coordinates
const documents = await client.getDocumentsByGeoCoordinates([2.645768, 39.578785]);  
```
# ITEM example

```js
//Get single item 
const item = await client.API.Item.getItem('<ITEM_OID>');

//Get multiple items
const items = await client.API.Item.getItems(['<ITEM_OID>','<ITEM_OID>']);
```