@coderscolony/content-svc-client v1.0.3
@coderscolony/content-svc-client
contentSVC - JavaScript client for @coderscolony/content-svc-client Content Service provides API for country, city, hotel, landmarks This SDK is automatically generated by the Swagger Codegen project:
- API version: 1.0.3
- Package version: 1.0.3
- Build package: io.swagger.codegen.languages.JavascriptClientCodegen
Installation
For Node.js
npm
To publish the library as a npm, please follow the procedure in "Publishing npm packages".
Then install it via:
npm install @coderscolony/content-svc-client --save
git
If the library is hosted at a git repository, e.g. https://github.com/GIT_USER_ID/GIT_REPO_ID then install it via:
npm install GIT_USER_ID/GIT_REPO_ID --save
For browser
The library also works in the browser environment via npm and browserify. After following
the above steps with Node.js and installing browserify with npm install -g browserify
,
perform the following (assuming main.js is your entry file):
browserify main.js > bundle.js
Then include bundle.js in the HTML pages.
Getting Started
Please follow the installation instruction and execute the following JS code:
var contentSVC = require('@coderscolony/content-svc-client');
var defaultClient = contentSVC.ApiClient.instance;
// Configure API key authorization: bearer
var bearer = defaultClient.authentications['bearer'];
bearer.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//bearer.apiKeyPrefix['Authorization'] = "Token"
var api = new contentSVC.AirportApi()
var body = new contentSVC.Airport(); // {Airport}
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.addAirport(body, callback);
Documentation for API Endpoints
All URIs are relative to https://localhost/
Class | Method | HTTP request | Description |
---|---|---|---|
contentSVC.AirportApi | addAirport | POST /airport | Create Airport |
contentSVC.AirportApi | deleteAirportByID | DELETE /airport/{id} | Delete airport by id |
contentSVC.AirportApi | getAirportByID | GET /airport/{id} | Get airport by id |
contentSVC.AirportApi | getAirports | GET /airport | Get airports |
contentSVC.AirportApi | searchCircleAirport | GET /airport/search-circle | Search by location |
contentSVC.AirportApi | updateAirportByID | PUT /airport/{id} | Update airport by id |
contentSVC.AreaApi | addArea | POST /area | Create Area |
contentSVC.AreaApi | deleteAreaByID | DELETE /area/{id} | Delete area by id |
contentSVC.AreaApi | getAreaByID | GET /area/{id} | Get area by id |
contentSVC.AreaApi | getAreas | GET /area | Get areas |
contentSVC.AreaApi | updateAreaByID | PUT /area/{id} | Update area by id |
contentSVC.AutocompleteApi | autocomplete | GET /autocomplete | Autocomplete |
contentSVC.ChainApi | addChain | POST /chain | Create Chain Hotel |
contentSVC.ChainApi | deleteChainByID | DELETE /chain/{id} | Delete chain hotel by id |
contentSVC.ChainApi | getChainByID | GET /chain/{id} | Get chain by id |
contentSVC.ChainApi | getChains | GET /chain | Get chains |
contentSVC.ChainApi | updateChainByID | PUT /chain/{id} | Update chain by id |
contentSVC.CityApi | createCity | POST /city | Create city |
contentSVC.CityApi | deleteCityByID | DELETE /city/{id} | Delete city by id |
contentSVC.CityApi | getCities | GET /city | Get cities |
contentSVC.CityApi | getCityByCode | GET /city/findByCode/{codeType}/{code} | Get city by map code |
contentSVC.CityApi | getCityByID | GET /city/{id} | Get city by id |
contentSVC.CityApi | getCityBySlug | GET /city/findBySlug/{slug} | Get city by slug |
contentSVC.CityApi | getCityPopular | GET /city/popular/{type} | Get popular cities |
contentSVC.CityApi | getCityRecommendations | GET /city/recommendations | Get city recommendations |
contentSVC.CityApi | getHotelsByCityID | GET /city/{id}/hotel | Get hotels by city id |
contentSVC.CityApi | getTopHotelsByCityID | GET /city/{id}/hotel/top | Get top hotels by city id |
contentSVC.CityApi | setCityPopular | PUT /city/popular/{type} | Set popular cities |
contentSVC.CityApi | setRecommendationCities | PUT /city/recommendations | Set recommendation cities |
contentSVC.CityApi | setTopHotelsByCityId | PUT /city/{id}/hotel/top | Set top hotels by cityId |
contentSVC.CityApi | updateCityByID | PUT /city/{id} | Update city by id |
contentSVC.CountryApi | createCountry | POST /country | Create country |
contentSVC.CountryApi | deleteCountryByID | DELETE /country/{id} | Delete country by id |
contentSVC.CountryApi | getCitiesByCountryID | GET /country/{id}/city | Get cities by country id |
contentSVC.CountryApi | getCountries | GET /country | Get all countries |
contentSVC.CountryApi | getCountryByCode | GET /country/findByCode/{codeType}/{code} | Get country by map code |
contentSVC.CountryApi | getCountryByID | GET /country/{id} | Get country by id |
contentSVC.CountryApi | getCountryBySlug | GET /country/findBySlug/{slug} | Get country by slug |
contentSVC.CountryApi | getTopCitiesByCountryID | GET /country/{id}/city/top | Get top cities by country id |
contentSVC.CountryApi | setTopCitiesByCountryCode | PUT /country/{id}/city/top | Set top cities by countryCode |
contentSVC.CountryApi | updateCountryByID | PUT /country/{id} | Update country by id |
contentSVC.HotelApi | createHotel | POST /hotel | Create hotel |
contentSVC.HotelApi | deleteHotelByID | DELETE /hotel/{id} | Delete hotel by id |
contentSVC.HotelApi | getHotelByCode | GET /hotel/findByCode/{codeType}/{code} | Get hotel by mapping code |
contentSVC.HotelApi | getHotelByID | GET /hotel/{id} | Get hotel by id |
contentSVC.HotelApi | getHotelBySlug | GET /hotel/findBySlug/{slug} | Get hotel by slug |
contentSVC.HotelApi | getHotelRecommendations | GET /hotel/recommendations | Get hotel recommendations |
contentSVC.HotelApi | getHotels | GET /hotel | Get hotels |
contentSVC.HotelApi | getManyHotelByCode | POST /hotel/findByCode | Get many hotel by mapping code |
contentSVC.HotelApi | getRelatedHotelByID | GET /hotel/{id}/related | Get related hotel by id |
contentSVC.HotelApi | searchCircleHotel | GET /hotel/search-circle | Find hotels near a given point. |
contentSVC.HotelApi | setChainsByHotelID | PUT /hotel/{id}/chain | Set chains by hotel id |
contentSVC.HotelApi | setRecommendationHotels | PUT /hotel/recommendations | Set recommendation hotels |
contentSVC.HotelApi | updateHotelByID | PUT /hotel/{id} | Update hotel by id |
contentSVC.LandmarkApi | addLandmark | POST /landmark | Create Landmark |
contentSVC.LandmarkApi | deleteLandmarkByID | DELETE /landmark/{id} | Delete landmark by id |
contentSVC.LandmarkApi | getLandmarkByID | GET /landmark/{id} | Get landmark by id |
contentSVC.LandmarkApi | getLandmarks | GET /landmark | Get landmarks |
contentSVC.LandmarkApi | searchCircleLandmark | GET /landmark/search-circle | Find landmarks and attractions near a given point. |
contentSVC.LandmarkApi | updateLandmarkByID | PUT /landmark/{id} | Update landmark by id |
Documentation for Models
- contentSVC.Airport
- contentSVC.AirportCity
- contentSVC.AirportCityCountry
- contentSVC.Area
- contentSVC.Body
- contentSVC.Chain
- contentSVC.City
- contentSVC.CodeMap
- contentSVC.Country
- contentSVC.DateTimeObject
- contentSVC.ErrorModel
- contentSVC.ErrorModelError
- contentSVC.Hotel
- contentSVC.HotelContact
- contentSVC.HotelContactAddress
- contentSVC.HotelDescriptions
- contentSVC.HotelFacility
- contentSVC.HotelFacilityType
- contentSVC.HotelType
- contentSVC.Image
- contentSVC.InlineResponse200
- contentSVC.InlineResponse2001
- contentSVC.InlineResponse2002
- contentSVC.InlineResponse2003
- contentSVC.Landmark
- contentSVC.LandmarkCategory
- contentSVC.LandmarksearchcircleNearby
Documentation for Authorization
bearer
- Type: API key
- API key parameter name: Authorization
- Location: HTTP header
6 years ago