0.0.1 • Published 7 years ago

bookinghint-js-client v0.0.1

Weekly downloads
1
License
CC-BY-NC-4.0
Repository
-
Last release
7 years ago

booking_hint

BookingHint - JavaScript client for booking_hint This is the API specification for the bookingHint project. Built on my propertyobject.js project, I have aimed to create a generic framework that can be easily adapted to as many applications as possible. This SDK is automatically generated by the Swagger Codegen project:

  • API version: 0.0.1
  • Package version: 0.0.1
  • Build package: class 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 booking_hint --save

git

If the library is hosted at a git repository, e.g. https://github.com/YOUR_USERNAME/booking_hint then install it via:

    npm install YOUR_USERNAME/booking_hint --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 BookingHint = require('booking_hint');

var api = new BookingHint.AuthApi()

var username = "username_example"; // {String} The username that we want to login with. 

var body = new BookingHint.Body(); // {Body} Set the property \"password\" to the password to login with. 


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.loginPOST(username, body, callback);

Documentation for API Endpoints

All URIs are relative to http://localhost:8081

ClassMethodHTTP requestDescription
BookingHint.AuthApiloginPOSTPOST /login
BookingHint.AuthApilogoutDELETEDELETE /logout
BookingHint.MessageApimessagesGETGET /messages
BookingHint.MessageApimessagesGenericMessageidGETGET /messages/generic/{messageid}
BookingHint.MessageApimessagesGenericMessageidPropertykeyPUTPUT /messages/generic/{messageid}/{propertykey}
BookingHint.MessageApimessagesSmsPOSTPOST /messages/sms
BookingHint.UserApiusersGETGET /users
BookingHint.UserApiusersUsernameAdminGETGET /users/{username}/admin
BookingHint.UserApiusersUsernameAdminPUTPUT /users/{username}/admin
BookingHint.UserApiusersUsernameDELETEDELETE /users/{username}
BookingHint.UserApiusersUsernamePOSTPOST /users/{username}
BookingHint.UserApiusersUsernamePasswordPUTPUT /users/{username}/password
BookingHint.UserApiusersUsernameSettingsDELETEDELETE /users/{username}/settings
BookingHint.UserApiusersUsernameSettingsGETGET /users/{username}/settings
BookingHint.UserApiusersUsernameSettingsSettingkeyGETGET /users/{username}/settings/{settingkey}
BookingHint.UserApiusersUsernameSettingsSettingkeyPUTPUT /users/{username}/settings/{settingkey}

Documentation for Models

Documentation for Authorization

authKey

  • Type: API key
  • API key parameter name: authKey
  • Location: URL query string