1.0.3 • Published 6 years ago

@coderscolony/content-svc-client v1.0.3

Weekly downloads
1
License
Unlicense
Repository
-
Last release
6 years ago

@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/

ClassMethodHTTP requestDescription
contentSVC.AirportApiaddAirportPOST /airportCreate Airport
contentSVC.AirportApideleteAirportByIDDELETE /airport/{id}Delete airport by id
contentSVC.AirportApigetAirportByIDGET /airport/{id}Get airport by id
contentSVC.AirportApigetAirportsGET /airportGet airports
contentSVC.AirportApisearchCircleAirportGET /airport/search-circleSearch by location
contentSVC.AirportApiupdateAirportByIDPUT /airport/{id}Update airport by id
contentSVC.AreaApiaddAreaPOST /areaCreate Area
contentSVC.AreaApideleteAreaByIDDELETE /area/{id}Delete area by id
contentSVC.AreaApigetAreaByIDGET /area/{id}Get area by id
contentSVC.AreaApigetAreasGET /areaGet areas
contentSVC.AreaApiupdateAreaByIDPUT /area/{id}Update area by id
contentSVC.AutocompleteApiautocompleteGET /autocompleteAutocomplete
contentSVC.ChainApiaddChainPOST /chainCreate Chain Hotel
contentSVC.ChainApideleteChainByIDDELETE /chain/{id}Delete chain hotel by id
contentSVC.ChainApigetChainByIDGET /chain/{id}Get chain by id
contentSVC.ChainApigetChainsGET /chainGet chains
contentSVC.ChainApiupdateChainByIDPUT /chain/{id}Update chain by id
contentSVC.CityApicreateCityPOST /cityCreate city
contentSVC.CityApideleteCityByIDDELETE /city/{id}Delete city by id
contentSVC.CityApigetCitiesGET /cityGet cities
contentSVC.CityApigetCityByCodeGET /city/findByCode/{codeType}/{code}Get city by map code
contentSVC.CityApigetCityByIDGET /city/{id}Get city by id
contentSVC.CityApigetCityBySlugGET /city/findBySlug/{slug}Get city by slug
contentSVC.CityApigetCityPopularGET /city/popular/{type}Get popular cities
contentSVC.CityApigetCityRecommendationsGET /city/recommendationsGet city recommendations
contentSVC.CityApigetHotelsByCityIDGET /city/{id}/hotelGet hotels by city id
contentSVC.CityApigetTopHotelsByCityIDGET /city/{id}/hotel/topGet top hotels by city id
contentSVC.CityApisetCityPopularPUT /city/popular/{type}Set popular cities
contentSVC.CityApisetRecommendationCitiesPUT /city/recommendationsSet recommendation cities
contentSVC.CityApisetTopHotelsByCityIdPUT /city/{id}/hotel/topSet top hotels by cityId
contentSVC.CityApiupdateCityByIDPUT /city/{id}Update city by id
contentSVC.CountryApicreateCountryPOST /countryCreate country
contentSVC.CountryApideleteCountryByIDDELETE /country/{id}Delete country by id
contentSVC.CountryApigetCitiesByCountryIDGET /country/{id}/cityGet cities by country id
contentSVC.CountryApigetCountriesGET /countryGet all countries
contentSVC.CountryApigetCountryByCodeGET /country/findByCode/{codeType}/{code}Get country by map code
contentSVC.CountryApigetCountryByIDGET /country/{id}Get country by id
contentSVC.CountryApigetCountryBySlugGET /country/findBySlug/{slug}Get country by slug
contentSVC.CountryApigetTopCitiesByCountryIDGET /country/{id}/city/topGet top cities by country id
contentSVC.CountryApisetTopCitiesByCountryCodePUT /country/{id}/city/topSet top cities by countryCode
contentSVC.CountryApiupdateCountryByIDPUT /country/{id}Update country by id
contentSVC.HotelApicreateHotelPOST /hotelCreate hotel
contentSVC.HotelApideleteHotelByIDDELETE /hotel/{id}Delete hotel by id
contentSVC.HotelApigetHotelByCodeGET /hotel/findByCode/{codeType}/{code}Get hotel by mapping code
contentSVC.HotelApigetHotelByIDGET /hotel/{id}Get hotel by id
contentSVC.HotelApigetHotelBySlugGET /hotel/findBySlug/{slug}Get hotel by slug
contentSVC.HotelApigetHotelRecommendationsGET /hotel/recommendationsGet hotel recommendations
contentSVC.HotelApigetHotelsGET /hotelGet hotels
contentSVC.HotelApigetManyHotelByCodePOST /hotel/findByCodeGet many hotel by mapping code
contentSVC.HotelApigetRelatedHotelByIDGET /hotel/{id}/relatedGet related hotel by id
contentSVC.HotelApisearchCircleHotelGET /hotel/search-circleFind hotels near a given point.
contentSVC.HotelApisetChainsByHotelIDPUT /hotel/{id}/chainSet chains by hotel id
contentSVC.HotelApisetRecommendationHotelsPUT /hotel/recommendationsSet recommendation hotels
contentSVC.HotelApiupdateHotelByIDPUT /hotel/{id}Update hotel by id
contentSVC.LandmarkApiaddLandmarkPOST /landmarkCreate Landmark
contentSVC.LandmarkApideleteLandmarkByIDDELETE /landmark/{id}Delete landmark by id
contentSVC.LandmarkApigetLandmarkByIDGET /landmark/{id}Get landmark by id
contentSVC.LandmarkApigetLandmarksGET /landmarkGet landmarks
contentSVC.LandmarkApisearchCircleLandmarkGET /landmark/search-circleFind landmarks and attractions near a given point.
contentSVC.LandmarkApiupdateLandmarkByIDPUT /landmark/{id}Update landmark by id

Documentation for Models

Documentation for Authorization

bearer

  • Type: API key
  • API key parameter name: Authorization
  • Location: HTTP header