Vervotech.MappingApi
1.0.14
See the version list below for details.
dotnet add package Vervotech.MappingApi --version 1.0.14
NuGet\Install-Package Vervotech.MappingApi -Version 1.0.14
<PackageReference Include="Vervotech.MappingApi" Version="1.0.14" />
<PackageVersion Include="Vervotech.MappingApi" Version="1.0.14" />
<PackageReference Include="Vervotech.MappingApi" />
paket add Vervotech.MappingApi --version 1.0.14
#r "nuget: Vervotech.MappingApi, 1.0.14"
#:package Vervotech.MappingApi@1.0.14
#addin nuget:?package=Vervotech.MappingApi&version=1.0.14
#tool nuget:?package=Vervotech.MappingApi&version=1.0.14
Vervotech.MappingApi
A brief description of your NuGet package and its purpose.
Table of Contents
Installation
You can install this package via NuGet Package Manager or .NET CLI:
NuGet Package Manager
Install-Package Vervotech.MappingApi
.NET CLI
dotnet add package Vervotech.MappingApi
Alternatively, you can include it directly in your .csproj
file:
<PackageReference Include="Vervotech.MappingApi" Version="1.0.7" />
Usage
Here's a step-by-step guide and example on how to use this package:
- Create a simple .NET project and add a class file, e.g.,
VervotechMappingSyncer.cs
. ThisVervotechMappingSyncer
will communicate with theVervotech.MappingApi
NuGet package. - To start with Mapping or Content sync, you need to set up the requirements. For example, API Configuration and Sync configuration in the defined format as shown in the JSON file below.
Configuration
{ "SyncConfiguration": { "LoggerFilePath": "path/to/logger/file", // Path to the log file where logs will be saved "MappingSyncConfig": { // Configuration settings for mapping synchronization "LastUpdatedDateTime": "2024-08-05T00:00:00", // The last date and time when mapping was updated as per documentation "Providers": ["Provider1", "Provider2"], // List of providers for which mappings are required "RequiresFullMapping": true, // Indicates if a full mapping sync is required (it will process Deleted, New, and Updated mappings from the date provided in LastUpdatedDateTime) "RequiresDeletedMapping": false, // Indicates if only deleted mappings need to be synchronized "RequiresNewMappings": true, // Indicates if only new mappings need to be synchronized "RequiresUpdatedMapping": true, // Indicates if only updated mappings need to be synchronized "RequiresAllVervotechIds": false // Indicates if all Vervotech IDs need to be fetched }, "ContentSyncConfig": { // Configuration settings for content synchronization "GetCuratedContentByProviderIdRequest": { // Request to get curated content by provider ID // All these request models' structures are available in the Vervotech API documentation }, "GetCuratedContentByVervotechIdRequest": { // Request to get curated content by Vervotech ID }, "GetProviderContentByProviderIdRequest": { // Request to get provider content by provider ID }, "GetProviderContentByVervotechIdRequest": { // Request to get provider content by Vervotech ID }, "RequiresCuratedContent": true, // Indicates if curated content is required for synchronization "RequiresProviderContent": false // Indicates if provider content is required for synchronization }, "MasterContentSyncConfig": { // Configuration for master content synchronization "GetMasterHotelFacilityGroups": true, // Indicates if master hotel facility groups need to be fetched "GetMasterHotelChains": false, // Indicates if master hotel chains need to be fetched "GetMasterHotelBrands": true // Indicates if master hotel brands need to be fetched }, "OperationalApiConfig": { // Configuration settings for operational API "SaveStartMappingApiResponse": false, // Indicates if the start mapping API response should be saved or not "TemplateType": "Vervotech_Template", // File template followed in the uploaded file (e.g., Vervotech_Template) "FolderName": "18122019/HotelBeds/johndoe__johndoe__HotelBeds" // Name of the folder where the file is uploaded (e.g., 18122019/HotelBeds/johndoe__johndoe__HotelBeds) }, // Required "MappingRepositoryType": "NugetPackage.Integration.Test.DataBase.MappingRepository, NugetPackage.Integration.Test", // Provide the repository namespace and assembly name where database logic is implemented for IMappingRepository interface (e.g., namespace.classname, assembly name) // Required "ContentRepositoryType": "TypeB", // Provide the repository namespace and assembly name where database logic is implemented for IContentRepository interface // Required "MasterContentRepositoryType": "TypeC", // Provide the repository namespace and assembly name where database logic is implemented for IMasterContentRepository interface // Required "FtpPropertyMappingRepositoryType": "TypeD" // Provide the repository namespace and assembly name where database logic is implemented for IFtpPropertyMappingRepository interface }, "ApiConfiguration": { "AccountId": "your account id", // Your Vervotech account ID "ApiKey": "your api key" // Your Vervotech API key } }
## Code Snippet
```csharp
namespace NugetPackage.Integration.Test.DataBase
{
public class MappingRepository : IMappingRepository
{
public MappingRepository(IConnectionFactory connectionFactory)
{
// Create your DB connection here using connectionFactory interface
}
public async Task AddAsync(List<int> vervotechIds, CancellationToken cancellationToken)
{
// Logic to save vervotech ids to database
}
public async Task CreateAsync(HotelMapping mapping, CancellationToken cancellationToken)
{
// Logic to create new mapping in mapping DB
}
public async Task DeleteAsync(HotelMapping mapping, CancellationToken cancellationToken)
{
// Logic to delete mapping in mapping DB
}
public async Task UpdateAsync(HotelMapping mapping, CancellationToken cancellationToken)
{
// Logic to update existing mapping in mapping DB
}
}
}
Implement the below interfaces for ContentSync, MasterContentSync, and Operational API:
- `IContentRepository`
- `IMasterContentRepository`
- `IFtpPropertyMappingRepository`
*These interfaces are available in the package. You just need to add the reference to access them in your implementation class.*
## Features
- **Mapping Sync**
- **Content Sync**
- **Master Content Sync**
- **Operational APIs**
## License
This package is licensed under the Apache 2.0 License - see the [LICENSE](LICENSE) file for details.
## Contact
If you have any questions or feedback, feel free to reach out at [support@vervotech.com](mailto:support@vervotech.com).
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- Microsoft.Extensions.Configuration.Abstractions (>= 8.0.0)
- Microsoft.Extensions.Http (>= 8.0.0)
- Newtonsoft.Json (>= 13.0.3)
- NuGet.Versioning (>= 6.10.1)
- Serilog (>= 4.0.1)
- Serilog.Extensions.Logging (>= 8.0.0)
- Serilog.Sinks.File (>= 6.0.0)
- Vervotech.MappingApi.Interfaces (>= 1.0.14)
- Vervotech.MappingApi.Services (>= 1.0.14)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last Updated |
---|---|---|
1.0.17 | 286 | 12/10/2024 |
1.0.16 | 151 | 8/23/2024 |
1.0.15 | 150 | 8/23/2024 |
1.0.14 | 144 | 8/23/2024 |
1.0.13 | 153 | 8/21/2024 |
1.0.12 | 143 | 8/21/2024 |
1.0.11 | 124 | 8/4/2024 |
1.0.10 | 100 | 8/4/2024 |
1.0.9 | 91 | 8/4/2024 |
1.0.8 | 111 | 8/2/2024 |
1.0.7 | 103 | 7/26/2024 |
1.0.6 | 100 | 7/26/2024 |
1.0.5 | 107 | 7/26/2024 |
1.0.1 | 115 | 7/10/2024 |
1.0.0 | 125 | 7/9/2024 |