travel_conseriage
TravelConseriage - JavaScript client for travel_conseriage
API for managing Travel Conceriage Service datasets.
This SDK is automatically generated by the Swagger Codegen project:
- API version: 1.0.0
- Package version: 1.0.0
- Build package: io.swagger.codegen.languages.JavascriptClientCodegen
Installation
npm
To publish the library as a npm,
please follow the procedure in "Publishing npm packages".
Then install it via:
npm install travel_conseriage --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 TravelConseriage = require('travel_conseriage');
var api = new TravelConseriage.AgencyApi()
var body = new TravelConseriage.Agency();
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
api.createAgency(body, callback);
Documentation for API Endpoints
All URIs are relative to http://localhost:8080/tc
Class | Method | HTTP request | Description |
---|
TravelConseriage.AgencyApi | createAgency | POST /agency | Create Agency |
TravelConseriage.AgencyApi | getAgencies | GET /agency/getAgency | Returns all agencies in the system |
TravelConseriage.AgencyApi | getAgencyById | GET /agency/getAgencyById | Returns an Agency for a given id |
TravelConseriage.AgentApi | createAgent | POST /agent | Create Agent |
TravelConseriage.AgentApi | createAgentsWithArrayInput | POST /agent/createWithArray | Creates list of agents with given input array |
TravelConseriage.AgentApi | getAgents | GET /agent/getAgents | Returns all agents in the system |
TravelConseriage.AgentApi | getagentById | GET /agent/getAgentById | Returns An Agent for a given id |
TravelConseriage.AgentApi | loginUser | GET /agent/login | Logs user into the system |
TravelConseriage.PackageApi | getInventory | GET /package/inventory | Returns package inventories |
TravelConseriage.UserApi | addUser | POST /user | Register a new user |
TravelConseriage.UserApi | updateUser | PUT /user | Update an existing User |
Documentation for Models
Documentation for Authorization
agent_auth
- Type: OAuth
- Flow: implicit
- Authorization URL: http://abc.com/oauth/dialog
- Scopes:
- write:packages: modify packages in your account
- read:packages: read your packages
api_key
- Type: API key
- API key parameter name: api_key
- Location: HTTP header