1.0.1 • Published 6 years ago

iii_dispatch v1.0.1

Weekly downloads
-
License
Apache 2.0
Repository
-
Last release
6 years ago

iii_dispatch

IiiDispatch - JavaScript client for iii_dispatch 本文件定義iii派車系統Web API,相關系統規格請參考 http://xxx.xxx.xxx.預定開發/運行系統:.NET Core 2.0 預定開發技術:ASP .NET Web API 預定使用資料庫:MongoDB/MariaDB This SDK is automatically generated by the Swagger Codegen project:

  • API version: 1.0.1
  • Package version: 1.0.1
  • 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 iii_dispatch --save
Local development

To use the library locally without publishing to a remote npm registry, first install the dependencies by changing into the directory containing package.json (and this README). Let's call this JAVASCRIPT_CLIENT_DIR. Then run:

npm install

Next, link it globally in npm with the following, also from JAVASCRIPT_CLIENT_DIR:

npm link

Finally, switch to the directory you want to use your iii_dispatch from, and run:

npm link /path/to/<JAVASCRIPT_CLIENT_DIR>

You should now be able to require('iii_dispatch') in javascript files from the directory you ran the last command above from.

git

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

    npm install YOUR_USERNAME/iii_dispatch --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, that's to say your javascript file where you actually use this library):

browserify main.js > bundle.js

Then include bundle.js in the HTML pages.

Webpack Configuration

Using Webpack you may encounter the following error: "Module not found: Error: Cannot resolve module", most certainly you should disable AMD loader. Add/merge the following section to your webpack config:

module: {
  rules: [
    {
      parser: {
        amd: false
      }
    }
  ]
}

Getting Started

Please follow the installation instruction and execute the following JS code:

var IiiDispatch = require('iii_dispatch');

var api = new IiiDispatch.DispatchApi()

var body = new IiiDispatch.Dispatch(); // {Dispatch} Created dispatch object


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

Documentation for API Endpoints

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

ClassMethodHTTP requestDescription
IiiDispatch.DispatchApicreateDispatchPOST /dispatch新增載客工作單
IiiDispatch.DispatchApideleteDispatchDELETE /dispatch/{dispatchId}Deletes a dispatch
IiiDispatch.DispatchApifindAllDispatchesGET /dispatch取得增載客工作單清單
IiiDispatch.DispatchApigetDispatchByIdGET /dispatch/{dispatchId}以ID連結載客工作單資料
IiiDispatch.DispatchingApiupdateDispatchWithArrivePOST /dispatching/arrive載客工作流程:乘客抵達目的地
IiiDispatch.DispatchingApiupdateDispatchWithPaymentPOST /dispatching/payment載客工作流程:乘客支付車資
IiiDispatch.DispatchingApiupdateDispatchWithPickPOST /dispatching/pick載客工作流程:乘客上車
IiiDispatch.DriverApicreateDriverPOST /driver新增司機
IiiDispatch.DriverApideleteDriverDELETE /driver/{username}Delete driver
IiiDispatch.DriverApigetDriverByNameGET /driver/{username}Get driver by user name
IiiDispatch.DriverApiloginDriverPOST /driver/loginLogs driver into the system
IiiDispatch.DriverApilogoutDriverGET /driver/logoutLogs out current logged in driver session
IiiDispatch.DriverApiupdateDriverPUT /driver/{username}Updated driver
IiiDispatch.TaxiApiaddTaxiPOST /taxi新增車輛
IiiDispatch.TaxiApideleteTaxiDELETE /taxi/{taxiId}Deletes a taxi
IiiDispatch.TaxiApifindTaxiByStatusGET /taxi/findByStatusFinds Taxi by status
IiiDispatch.TaxiApigetTaxiByIdGET /taxi/{taxiId}以ID連結車輛資料
IiiDispatch.TaxiApiupdateTaxiPUT /taxi更新車輛資料
IiiDispatch.TaxiApiupdateTaxiWithFormPOST /taxi/{taxiId}更新ID指定之車輛資料
IiiDispatch.TaxiRequestApicreateTaxiRequestPOST /taxi_request新增叫車
IiiDispatch.TaxiRequestApideleteTaxiRequestDELETE /taxi_request/{taxi_requestId}Deletes a taxi_request
IiiDispatch.TaxiRequestApifindAllTaxiRequestsGET /taxi_request取得叫車服務清單
IiiDispatch.TaxiRequestApigetTaxiRequestByIdGET /taxi_request/{taxi_requestId}以ID連結叫車資料
IiiDispatch.TaxiRequestApiupdateTaxiRequestWithFormPOST /taxi_request/{taxi_requestId}更新ID指定之叫車資料
IiiDispatch.UserApicreateUserPOST /user新增乘客
IiiDispatch.UserApicreateUsersWithListInputPOST /user/createWithListCreates list of users with given input array
IiiDispatch.UserApideleteUserDELETE /user/{username}Delete user
IiiDispatch.UserApigetUserByNameGET /user/{username}Get user by user name
IiiDispatch.UserApigetUserPasswordPOST /user/register_get_passwordForget password
IiiDispatch.UserApiloginUserPOST /user/loginLogs user into the system
IiiDispatch.UserApilogoutUserGET /user/logoutLogs out current logged in user session
IiiDispatch.UserApiregisterEmailPOST /user/register_emailRegistering email
IiiDispatch.UserApiregisterPasswordPOST /user/register_passwordRegistering password
IiiDispatch.UserApiregisterUserPOST /user/registerRegister user into the system
IiiDispatch.UserApiregisterUsernamePOST /user/register_usernameRegistering username
IiiDispatch.UserApiregisterVerifyPOST /user/register_verifyVerify using pushed validation code
IiiDispatch.UserApiupdateUserPUT /user/{username}Updated user

Documentation for Models

Documentation for Authorization

api_key

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

iii_dispatch_auth