LODGEA SDK for csharp. Check out https://docs.lodgea.io for more information.
This C# SDK is automatically generated by the OpenAPI Generator project:
- API version: 1.2.0
- SDK version: 1.2.0
- Build package: org.openapitools.codegen.languages.CSharpClientCodegen
- .NET 4.0 or later
- Windows Phone 7.1 (Mango)
- RestSharp - 105.1.0 or later
- Json.NET - 7.0.0 or later
- JsonSubTypes - 1.2.0 or later
The DLLs included in the package may not be the latest version. We recommend using NuGet to obtain the latest version of the packages:
Install-Package RestSharp
Install-Package Newtonsoft.Json
Install-Package JsonSubTypes
NOTE: RestSharp versions greater than 105.1.0 have a bug which causes file uploads to fail. See RestSharp#742
Run the following command to generate the DLL
- [Mac/Linux]
/bin/sh build.sh
- [Windows]
build.bat
Then include the DLL (under the bin
folder) in the C# project, and use the namespaces:
using lodgea-csharp.com.lodgea.controllers;
using lodgea-csharp.Client;
using lodgea-csharp.com.lodgea.model;
A .nuspec
is included with the project. You can follow the Nuget quickstart to create and publish packages.
This .nuspec
uses placeholders from the .csproj
, so build the .csproj
directly:
nuget pack -Build -OutputDirectory out lodgea-csharp.csproj
Then, publish to a local feed or other host and consume the new package via Nuget as usual.
using System.Collections.Generic;
using System.Diagnostics;
using lodgea-csharp.com.lodgea.controllers;
using lodgea-csharp.Client;
using lodgea-csharp.com.lodgea.model;
namespace Example
{
public class Example
{
public static void Main()
{
Configuration.Default.BasePath = "https://api.eu.lodgea.io/v1";
// Configure API key authorization: ApiKeyAuth
Configuration.Default.ApiKey.Add("apiKey", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.ApiKeyPrefix.Add("apiKey", "Bearer");
var apiInstance = new DefaultApi(Configuration.Default);
var availabilitySearchPostRequest = new AvailabilitySearchPostRequest(); // AvailabilitySearchPostRequest | (optional)
try
{
// Search for availability
AvailabilitySearchPost200Response result = apiInstance.AvailabilitySearchPost(availabilitySearchPostRequest);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling DefaultApi.AvailabilitySearchPost: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
All URIs are relative to https://api.eu.lodgea.io/v1
Class | Method | HTTP request | Description |
---|---|---|---|
DefaultApi | AvailabilitySearchPost | POST /availability/search | Search for availability |
DefaultApi | LocationSearchPost | POST /location/search | Search for location |
DefaultApi | PropertiesGet | GET /properties | List (filtered) properties |
DefaultApi | PropertiesPropertyIdAvailabilityGet | GET /properties/{propertyId}/availability | Get a properties availability |
DefaultApi | PropertiesPropertyIdGet | GET /properties/{propertyId} | Get a properties details |
- com.lodgea.model.AvailabilitySearchPost200Response
- com.lodgea.model.AvailabilitySearchPostRequest
- com.lodgea.model.AvailablePropertiesInner
- com.lodgea.model.AvailablePropertiesInner1
- com.lodgea.model.AvailablePropertiesInner1AttractionListInner
- com.lodgea.model.AvailablePropertiesInner1AttractionListInnerDistance
- com.lodgea.model.AvailablePropertiesInner1Geo
- com.lodgea.model.AvailablePropertiesInner1GeoLocation
- com.lodgea.model.AvailablePropertiesInner1LowestPrice
- com.lodgea.model.AvailablePropertiesInner1MediaListInner
- com.lodgea.model.LocationSearchPost200Response
- com.lodgea.model.LocationSearchPost400Response
- com.lodgea.model.LocationSearchPost400ResponseValidationErrorsInner
- com.lodgea.model.LocationSearchPostRequest
- com.lodgea.model.PropertiesGet200Response
- com.lodgea.model.PropertiesGet200ResponseListInner
- com.lodgea.model.PropertiesPropertyIdAvailabilityGet200Response
- com.lodgea.model.PropertiesPropertyIdAvailabilityGet200ResponseAvailabilityListInner
- com.lodgea.model.PropertiesPropertyIdGet200Response
- com.lodgea.model.PropertiesPropertyIdGet200ResponseProductListInner
- com.lodgea.model.PropertiesPropertyIdGet200ResponseProductListInnerPolicyInfo
- com.lodgea.model.PropertiesPropertyIdGet200ResponseProductListInnerRatePlanListInner
- com.lodgea.model.PropertiesPropertyIdGet200ResponseProductListInnerRatePlanListInnerPricingListInner
- com.lodgea.model.PropertiesPropertyIdGet200ResponseProperty
- com.lodgea.model.PropertiesPropertyIdGet200ResponsePropertyAwardListInner
- com.lodgea.model.PropertiesPropertyIdGet200ResponsePropertyCancellationGracePeriod
- com.lodgea.model.PropertiesPropertyIdGet200ResponsePropertyContactListInner
- com.lodgea.model.PropertiesPropertyIdGet200ResponsePropertyContactListInnerAddressListInner
- com.lodgea.model.PropertiesPropertyIdGet200ResponsePropertyFacilityInfo
- com.lodgea.model.PropertiesPropertyIdGet200ResponsePropertyFacilityInfoGuestRoomListInner
- com.lodgea.model.PropertiesPropertyIdGet200ResponsePropertyFacilityInfoGuestRoomListInnerAmenityListInner
- com.lodgea.model.PropertiesPropertyIdGet200ResponsePropertyFacilityInfoGuestRoomListInnerMediaListInner
- com.lodgea.model.PropertiesPropertyIdGet200ResponsePropertyFacilityInfoGuestRoomListInnerMessageListInner
- com.lodgea.model.PropertiesPropertyIdGet200ResponsePropertyGuestInfo
- com.lodgea.model.PropertiesPropertyIdGet200ResponsePropertyPolicyListInner
- com.lodgea.model.PropertiesPropertyIdGet200ResponsePropertyPolicyListInnerCancellationPolicyListInner
- com.lodgea.model.PropertiesPropertyIdGet200ResponsePropertyPolicyListInnerFeePolicyListInner
- com.lodgea.model.PropertiesPropertyIdGet200ResponsePropertyPolicyListInnerGuaranteePolicy
- com.lodgea.model.PropertiesPropertyIdGet200ResponsePropertyPolicyListInnerPetsPolicy
- com.lodgea.model.PropertiesPropertyIdGet200ResponsePropertyPolicyListInnerTaxPolicyListInner
- com.lodgea.model.PropertiesPropertyIdGet200ResponsePropertyPropertyInfo
- com.lodgea.model.PropertiesPropertyIdGet200ResponsePropertyPropertyInfoAcceptedPaymentListInner
- com.lodgea.model.PropertiesPropertyIdGet200ResponsePropertyPropertyInfoMessageListInner
- com.lodgea.model.PropertiesPropertyIdGet200ResponsePropertyRecordCreated
- com.lodgea.model.PropertiesPropertyIdGet200ResponsePropertyRecordModified
- com.lodgea.model.PropertiesPropertyIdGet200ResponsePropertyServiceListInner
- com.lodgea.model.PropertiesPropertyIdGet200ResponsePropertyServiceListInnerOperationTimeListInner
-
Type: API key
-
API key parameter name: apiKey
-
Location: HTTP header