0.1.0 • Published 6 years ago

kiwicom_mmb_api v0.1.0

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

kiwicom_mmb_api

KiwicomMmbApi - JavaScript client for kiwicom_mmb_api An API for Kiwi.com's manage my booking section. This SDK is automatically generated by the Swagger Codegen project:

  • API version: 0.1.0
  • Package version: 0.1.0
  • 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 kiwicom_mmb_api --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 kiwicom_mmb_api from, and run:

npm link /path/to/<JAVASCRIPT_CLIENT_DIR>

You should now be able to require('kiwicom_mmb_api') 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/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, 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 KiwicomMmbApi = require('kiwicom_mmb_api');

var defaultClient = KiwicomMmbApi.ApiClient.instance;

// Configure API key authorization: UserTokenAuth
var UserTokenAuth = defaultClient.authentications['UserTokenAuth'];
UserTokenAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//UserTokenAuth.apiKeyPrefix['KW-User-Token'] = "Token"

var api = new KiwicomMmbApi.DefaultApi()

var bookingId = 56; // {Number} ID of the booking.


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

Documentation for API Endpoints

All URIs are relative to https://localhost/mmb/v1

ClassMethodHTTP requestDescription
KiwicomMmbApi.DefaultApikwMamboHandlersAlternativesGetGET /bookings/{booking_id}/alternativesShow alternatives for booking.
KiwicomMmbApi.DefaultApikwMamboHandlersBagsBagsPaymentRequestPOST /bookings/{booking_id}/bags/{extra_id}/paymentsRequest new payment for bags
KiwicomMmbApi.DefaultApikwMamboHandlersBagsBagsPaymentUpdatePATCH /bookings/{booking_id}/bags/{extra_id}/paymentsFinish or confirm the payment for bag extra
KiwicomMmbApi.DefaultApikwMamboHandlersBagsDeleteDELETE /bookings/{booking_id}/bags/{extra_id}Delete bag extra for booking at id
KiwicomMmbApi.DefaultApikwMamboHandlersBagsPostPOST /bookings/{booking_id}/bagsCreate new bag extra for booking at id
KiwicomMmbApi.DefaultApikwMamboHandlersBookingDeleteBookingDELETE /bookings/{booking_id}Cancel booking for user
KiwicomMmbApi.DefaultApikwMamboHandlersContactsDeleteDELETE /bookings/{booking_id}/contacts/{contact_id}Delete contact
KiwicomMmbApi.DefaultApikwMamboHandlersContactsGetGET /bookings/{booking_id}/contacts/{contact_id}Get contact for booking by ID
KiwicomMmbApi.DefaultApikwMamboHandlersContactsPostPOST /bookings/{booking_id}/contactsCreate a new group of contacts for booking
KiwicomMmbApi.DefaultApikwMamboHandlersContactsPutPUT /bookings/{booking_id}/contacts/{contact_id}Update contact for booking by ID
KiwicomMmbApi.DefaultApikwMamboHandlersContactsSearchGET /bookings/{booking_id}/contactsGet all contacts for booking
KiwicomMmbApi.DefaultApikwMamboHandlersFlightChangesPostPOST /bookings/{booking_id}/flight_changesCreate new flights extra for booking at id
KiwicomMmbApi.DefaultApikwMamboHandlersFlightEventsPatchPATCH /bookings/{booking_id}/flight_events/{event_id}React to schedule change with following options: Refund - customer requested refund for booking affected by flight event. Acknowledge - customer acknowledges minor flight event e.g. minor schedule change.
KiwicomMmbApi.DefaultApikwMamboHandlersFlightEventsPostOrderPOST /bookings/{booking_id}/flight_events/{event_id}/ordersCreates order for alternative
KiwicomMmbApi.DefaultApikwMamboHandlersPassengerChangeCreateRequestPOST /bookings/{booking_id}/passengers/change_requestsPost name correction request
KiwicomMmbApi.DefaultApikwMamboHandlersPriceChangesDeleteDELETE /bookings/{booking_id}/price_changes/{extra_id}Delete price_change extra for booking at id
KiwicomMmbApi.DefaultApikwMamboHandlersPriceChangesPostPOST /bookings/{booking_id}/price_changesCreate new price_change extra for booking at id
KiwicomMmbApi.DefaultApikwMamboHandlersPriceChangesPriceChangePaymentRequestPOST /bookings/{booking_id}/price_changes/{extra_id}/paymentsRequest new payment for price_change
KiwicomMmbApi.DefaultApikwMamboHandlersPriceChangesPriceChangePaymentUpdatePATCH /bookings/{booking_id}/price_changes/{extra_id}/paymentsFinish or confirm the payment for price_change extra
KiwicomMmbApi.DefaultApikwMamboHandlersReferralsDeleteDELETE /referrals/friends/{email}Delete an invitation
KiwicomMmbApi.DefaultApikwMamboHandlersReferralsEmailGetGET /referrals/email_checkCheck invitee's email
KiwicomMmbApi.DefaultApikwMamboHandlersReferralsPostPOST /referrals/friends/{email}Create an invitation
KiwicomMmbApi.DefaultApikwMamboHandlersReferralsPostMultiplePOST /referrals/friendsCreate an invitation
KiwicomMmbApi.DefaultApikwMamboHandlersReferralsSearchGET /referrals/friendsList of invitations
KiwicomMmbApi.DefaultApikwMamboHandlersRefundApplicationsGetGET /bookings/{booking_id}/refund-applicationsGet submitted refund applications for booking
KiwicomMmbApi.DefaultApikwMamboHandlersRefundsGetGET /bookings/{booking_id}/cancellationsGet refund options for booking
KiwicomMmbApi.DefaultApikwMamboHandlersRefundsPostPOST /bookings/{booking_id}/cancellationsRefund the booking.
KiwicomMmbApi.DefaultApikwMamboHandlersSeatOrderCancelSeatReservationDELETE /bookings/{booking_id}/seat_orders/{seat_reservation_id}Cancel seat reservation
KiwicomMmbApi.DefaultApikwMamboHandlersSeatOrderRequestSeatReservationPOST /bookings/{booking_id}/seat_ordersRequest seats reservation
KiwicomMmbApi.DefaultApikwMamboHandlersSeatmapsSearchGET /bookings/{booking_id}/seatmapsGet seatmaps for flight
KiwicomMmbApi.DefaultApikwMamboHandlersTicketsGetGET /bookings/{booking_id}/ticketsGet ticketing
KiwicomMmbApi.DefaultApikwMamboHandlersTicketsPostPOST /bookings/{booking_id}/ticketsSend ticket via email
KiwicomMmbApi.DefaultApipingGetGET /pingReturn a simple JSON payload for health check purposes
KiwicomMmbApi.DefaultApistoredPassengersGetGET /stored_passengersReturn all stored passengers of user
KiwicomMmbApi.DefaultApistoredPassengersPostPOST /stored_passengersSave new stored passenger for user

Documentation for Models

Documentation for Authorization

AdminAuth

  • Type: HTTP basic authentication

PartnerTokenAuth

  • Type: API key
  • API key parameter name: KW-Partner-Token
  • Location: HTTP header

SimpleTokenAuth

  • Type: API key
  • API key parameter name: KW-Simple-Token
  • Location: HTTP header

UserTokenAuth

  • Type: API key
  • API key parameter name: KW-User-Token
  • Location: HTTP header