OZmap is a solution by devOZ. Based in FlorianĂłpolis since 2012, we develop software focused on facilitating the mapping of georeferenced data with the intention of generating intelligent information for strategic decisions.
The OZmap SDK is a tool designed to help developers interact with the OZmap API, providing a streamlined interface for managing georeferenced data. This SDK includes various methods for creating, updating, retrieving, and deleting different models within the OZmap ecosystem, such as projects, cables, boxes, poles, and more.
- CRUD Operations: Easily create, read, update, and delete data.
- Data Mapping: Simplifies the interaction with georeferenced data.
- Batch Operations: Perform batch updates and retrieves efficiently.
- Pagination Support: Handle large datasets with pagination.
- Filter and Query: Advanced filtering and querying capabilities.
To install the OZmap SDK, use npm:
npm i --save @ozmap/ozmap-sdk
import OZMapSDK from '@ozmap/ozmap-sdk';
const sdk = new OZMapSDK('https://api.example.com', { login: 'your-ozmap-login', password: 'your-ozmap-password' });
import OZMapSDK from '@ozmap/ozmap-sdk';
const sdk = new OZMapSDK('https://api.example.com', { apiKey: 'your-ozmap-api-key' });
import OZMapSDK from 'ozmapsdk';
const sdk = new OZMapSDK('ozmapURL', { apiKey: 'yourApiKey' });
const newPopData: CreatePopDTO = {
name: "New Pop",
hierarchyLevel: 1,
popType: "popTypeId",
pole: "poleId",
implanted: true,
};
sdk.pop.create(newPopData).then((pop) => {
console.log('Pop created:', pop);
});
import OZMapSDK from 'ozmapsdk';
const sdk = new OZMapSDK('ozmapURL', { apiKey: 'yourApiKey' });
const updatePopData: UpdatePopDTO = {
name: "Updated Pop",
hierarchyLevel: 2,
};
sdk.pop.updateById('popId', updatePopData).then(() => {
console.log('Pop updated');
});
import OZMapSDK from 'ozmapsdk';
const sdk = new OZMapSDK('ozmapURL', { apiKey: 'yourApiKey' });
sdk.pop.find({ page: 1, limit: 10, filter: [
{
property: "name",
operator: FilterOperator.EQUAL,
value: "Popname",
}]
}).then((pagination) => {
console.log('Pops:', pagination);
});
import OZMapSDK from 'ozmapsdk';
const sdk = new OZMapSDK('ozmapURL', { apiKey: 'yourApiKey' });
sdk.pop.findById('popId').then((pop) => {
console.log('Pop:', pop);
});
import OZMapSDK from 'ozmapsdk';
const sdk = new OZMapSDK('ozmapURL', { apiKey: 'yourApiKey' });
sdk.pop.deleteById('popId').then(() => {
console.log('Pop deleted');
});
For detailed information about the API endpoints and how to use them, please refer to the OZmap API Documentation.
This project is licensed under the MIT License.