@flipdish/api-client-javascript

    1.0.115 • Public • Published

    @flipdish/api-client-javascript

    Flipdish - JavaScript client for @flipdish/api-client-javascript No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) This SDK is automatically generated by the Swagger Codegen project:

    • API version: v1.0
    • Package version: 1.0.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 @flipdish/api-client-javascript --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 @flipdish/api-client-javascript from, and run:

    npm link /path/to/<JAVASCRIPT_CLIENT_DIR>

    You should now be able to require('@flipdish/api-client-javascript') 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/@flipdish/api-client-javascript then install it via:

        npm install YOUR_USERNAME/@flipdish/api-client-javascript --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 Flipdish = require('@flipdish/api-client-javascript');
    
    var defaultClient = Flipdish.ApiClient.instance;
    
    // Configure OAuth2 access token for authorization: oauth2
    var oauth2 = defaultClient.authentications['oauth2'];
    oauth2.accessToken = "YOUR ACCESS TOKEN"
    
    var api = new Flipdish.AuthorizationTokensApi()
    
    var clientId = "clientId_example"; // {String} Client identifier
    
    var opts = { 
      'page': 56, // {Number} Requested page number
      'limit': 56 // {Number} Requested page limit
    };
    
    var callback = function(error, data, response) {
      if (error) {
        console.error(error);
      } else {
        console.log('API called successfully. Returned data: ' + data);
      }
    };
    api.getAuthorizationTokens(clientId, opts, callback);

    Documentation for API Endpoints

    All URIs are relative to https://api.flipdish.co

    Class Method HTTP request Description
    Flipdish.AuthorizationTokensApi getAuthorizationTokens GET /api/v1.0/authorizationtokens/{clientId} Get authorization tokens
    Flipdish.AuthorizationTokensApi revokeToken DELETE /api/v1.0/authorizationtokens/{key} Revoke token
    Flipdish.EventsApi getCustomerEvents GET /api/v1.0/events/customer/{customerId} Get customer events
    Flipdish.EventsApi getEvents GET /api/v1.0/events Get events
    Flipdish.EventsApi getEventsById GET /api/v1.0/events/{eventId} Get event by Id
    Flipdish.EventsApi getMenuEvents GET /api/v1.0/events/menu/{menuId} Get menu events
    Flipdish.EventsApi getOrderEvents GET /api/v1.0/events/order/{orderId} Get order events
    Flipdish.EventsApi getOrderEventsByCustomer GET /api/v1.0/events/order Get order events by customer
    Flipdish.EventsApi getStoreEvents GET /api/v1.0/events/store/{storeId} Get store events
    Flipdish.EventsApi getUserEvents GET /api/v1.0/events/user/{userId} Get user events
    Flipdish.EventsApi getWhiteLabelEvents GET /api/v1.0/events/whitelabel/{whitelabelId} Get WhiteLabel events
    Flipdish.HttpRequestResponseLogsApi getHttpLogsByUserIdAsync GET /api/v1.0/interactions/logs Get API interaction logs
    Flipdish.MenuOptionSetItemsApi addMenuItemOptionSetItem POST /api/v1.0/menus/{menuId}/sections/{menuSectionId}/sectionitems/{menuSectionItemId}/optionsets/{optionSetId}/optionsetitems Create menu item option set item
    Flipdish.MenuOptionSetItemsApi deleteOptionSetItemImage DELETE /api/v1.0/menus/{menuId}/sections/{menuSectionId}/sectionitems/{menuSectionItemId}/optionsets/{optionSetId}/optionsetitems/{menuItemOptionSetItemId}/image Delete menu item option set item image
    Flipdish.MenuOptionSetItemsApi getMenuItemOptionSetItemById GET /api/v1.0/menus/{menuId}/sections/{menuSectionId}/sectionitems/{menuSectionItemId}/optionsets/{optionSetId}/optionsetitems/{menuItemOptionSetItemId} Get menu item option set item by identifier
    Flipdish.MenuOptionSetItemsApi getMenuItemOptionSetItems GET /api/v1.0/menus/{menuId}/sections/{menuSectionId}/sectionitems/{menuSectionItemId}/optionsets/{optionSetId}/optionsetitems Get menu item option set items
    Flipdish.MenuOptionSetItemsApi removeMenuItemOptionSetItem DELETE /api/v1.0/menus/{menuId}/sections/{menuSectionId}/sectionitems/{menuSectionItemId}/optionsets/{optionSetId}/optionsetitems/{menuItemOptionSetItemId} Delete menu item option set item
    Flipdish.MenuOptionSetItemsApi updateMenuItemOptionSetItem POST /api/v1.0/menus/{menuId}/sections/{menuSectionId}/sectionitems/{menuSectionItemId}/optionsets/{optionSetId}/optionsetitems/{menuItemOptionSetItemId} Update menu item option set item
    Flipdish.MenuOptionSetItemsApi uploadOptionSetItemImage POST /api/v1.0/menus/{menuId}/sections/{menuSectionId}/sectionitems/{menuSectionItemId}/optionsets/{optionSetId}/optionsetitems/{menuItemOptionSetItemId}/image Upload menu item option set item image
    Flipdish.MenuOptionSetsApi createMenuItemOptionSet POST /api/v1.0/menus/{menuId}/sections/{menuSectionId}/sectionitems/{menuSectionItemId}/optionsets Create menu item option set
    Flipdish.MenuOptionSetsApi deleteMenuItemOptionSet DELETE /api/v1.0/menus/{menuId}/sections/{menuSectionId}/sectionitems/{menuSectionItemId}/optionsets/{optionSetId} Delete menu item option set
    Flipdish.MenuOptionSetsApi deleteOptionSetImage DELETE /api/v1.0/menus/{menuId}/sections/{menuSectionId}/sectionitems/{menuSectionItemId}/optionsets/{optionSetId}/image Delete option set image
    Flipdish.MenuOptionSetsApi getMenuItemOptionSetById GET /api/v1.0/menus/{menuId}/sections/{menuSectionId}/sectionitems/{menuSectionItemId}/optionsets/{optionSetId} Get menu item option set by identifier
    Flipdish.MenuOptionSetsApi getMenuItemOptionSets GET /api/v1.0/menus/{menuId}/sections/{menuSectionId}/sectionitems/{menuSectionItemId}/optionsets Get menu item option sets
    Flipdish.MenuOptionSetsApi updateMenuItemOptionSet POST /api/v1.0/menus/{menuId}/sections/{menuSectionId}/sectionitems/{menuSectionItemId}/optionsets/{optionSetId} Update menu item option set
    Flipdish.MenuOptionSetsApi uploadOptionSetImage POST /api/v1.0/menus/{menuId}/sections/{menuSectionId}/sectionitems/{menuSectionItemId}/optionsets/{optionSetId}/image Upload menu item option set image
    Flipdish.MenuSectionItemsApi createMenuSectionItem POST /api/v1.0/menus/{menuId}/sections/{menuSectionId}/sectionitems Create menu section item
    Flipdish.MenuSectionItemsApi deleteMenuSectionItem DELETE /api/v1.0/menus/{menuId}/sections/{menuSectionId}/sectionitems/{menuSectionItemId} Delete menu section item
    Flipdish.MenuSectionItemsApi deleteMenuSectionItemImage DELETE /api/v1.0/menus/{menuId}/sections/{menuSectionId}/sectionitems/{menuSectionItemId}/image Delete menu section item image
    Flipdish.MenuSectionItemsApi getMenuItemById GET /api/v1.0/menus/{menuId}/sections/{menuSectionId}/sectionitems/{menuSectionItemId} Get menu item by identifier
    Flipdish.MenuSectionItemsApi getMenuItems GET /api/v1.0/menus/{menuId}/sections/{menuSectionId}/sectionitems Get menu items
    Flipdish.MenuSectionItemsApi updateMenuSectionItem POST /api/v1.0/menus/{menuId}/sections/{menuSectionId}/sectionitems/{menuSectionItemId} Update menu section item
    Flipdish.MenuSectionItemsApi uploadMenuSectionItemImage POST /api/v1.0/menus/{menuId}/sections/{menuSectionId}/sectionitems/{menuSectionItemId}/image Upload menu section item image
    Flipdish.MenuSectionsApi createMenuSection POST /api/v1.0/menus/{menuId}/sections Create menu section
    Flipdish.MenuSectionsApi deleteMenuSection DELETE /api/v1.0/menus/{menuId}/sections/{menuSectionId} Delete menu section
    Flipdish.MenuSectionsApi deleteMenuSectionImage DELETE /api/v1.0/menus/{menuId}/sections/{menuSectionId}/image Delete menu section image
    Flipdish.MenuSectionsApi getMenuSectionById GET /api/v1.0/menus/{menuId}/sections/{menuSectionId} Get menu section by identifier
    Flipdish.MenuSectionsApi getMenuSections GET /api/v1.0/menus/{menuId}/sections Get menu sections
    Flipdish.MenuSectionsApi updateMenuSection POST /api/v1.0/menus/{menuId}/sections/{menuSectionId} Update menu section
    Flipdish.MenuSectionsApi uploadMenuSectionImage POST /api/v1.0/menus/{menuId}/sections/{menuSectionId}/image Upload menu section image
    Flipdish.MenusApi deleteMenuItemMetadata GET /api/v1.0/menus/{menuId}/menuitem/{menuItemId}/metadata/{key}/store/{storeId} Get a menu item metadata by key
    Flipdish.MenusApi deleteMenuItemMetadata_0 DELETE /api/v1.0/menus/{menuId}/menuitem/{menuItemId}/metadata/{key}/store/{storeId} Update a menu items metadata
    Flipdish.MenusApi deleteMenuSectionImage DELETE /api/v1.0/menus/{menuId}/image Delete menu image
    Flipdish.MenusApi getMenuById GET /api/v1.0/menus/{menuId} Get menu by identifier
    Flipdish.MenusApi getMenuItemMetadata GET /api/v1.0/menus/{menuId}/menuitem/{menuItemId}/metadata/store/{storeId} Get a menu items metadata
    Flipdish.MenusApi getMenuItemOptionSetItemMetadata GET /api/v1.0/menus/{menuId}/optionsetitem/{optionSetItemId}/metadata/store/{storeId} Get a menu item option set item metadata by key
    Flipdish.MenusApi setMenuItemMetadata PUT /api/v1.0/menus/{menuId}/menuitem/{menuItemId}/metadata/store/{storeId} Update a menu items metadata
    Flipdish.MenusApi setMenuItemOptionSetItemMetadata PUT /api/v1.0/menus/{menuId}/optionsetitem/{optionSetItemId}/metadata/store/{storeId} Update a menu item option set items metadata
    Flipdish.MenusApi updateMenu POST /api/v1.0/menus/{menuId} Update menu
    Flipdish.MenusApi uploadMenuSectionImage POST /api/v1.0/menus/{menuId}/image Upload menu image
    Flipdish.OAuthClientsApi addRedirectUri POST /api/v1.0/oauthclients/{oAuthClientId}/redirecturis Create OAuth client redirect uri
    Flipdish.OAuthClientsApi createOAuthClient POST /api/v1.0/oauthclients Create OAuth client
    Flipdish.OAuthClientsApi deleteOAuthClient DELETE /api/v1.0/oauthclients/{oAuthClientId} Delete OAuth client
    Flipdish.OAuthClientsApi getOAuthClientByClientId GET /api/v1.0/oauthclients/{clientId} Get OAuth client by identifier
    Flipdish.OAuthClientsApi getOAuthClientSecret GET /api/v1.0/oauthclients/{clientId}/secret Get OAuth client secret key
    Flipdish.OAuthClientsApi getOAuthClients GET /api/v1.0/oauthclients Get all OAuth client
    Flipdish.OAuthClientsApi getOauthAccessToken GET /api/v1.0/oauthclients/{oAuthClientId}/accesstoken Get OAuth access token for client
    Flipdish.OAuthClientsApi getRedirectUris GET /api/v1.0/oauthclients/{oAuthClientId}/redirecturis Get OAuth client redirect uris
    Flipdish.OAuthClientsApi removeRedirectUri DELETE /api/v1.0/oauthclients/{oAuthClientId}/redirecturis/{uriId} Delete OAuth client redirect uri
    Flipdish.OrdersApi acceptOrder POST /api/v1.0/orders/{id}/accept Accept order
    Flipdish.OrdersApi getOrderById GET /api/v1.0/orders/{id} Get order by ID
    Flipdish.OrdersApi getOrders GET /api/v1.0/orders Get orders by filter
    Flipdish.OrdersApi refundOrder POST /api/v1.0/orders/{id}/refund Refund order
    Flipdish.OrdersApi rejectOrder POST /api/v1.0/orders/{id}/reject Reject order
    Flipdish.StoresApi getStoreById GET /api/v1.0/stores/{storeId} Get store by identifier
    Flipdish.StoresApi getStores GET /api/v1.0/stores Get all stores
    Flipdish.UsersApi getRoles GET /api/v1.0/users/roles Get role names
    Flipdish.VouchersApi deleteVoucherMetadata DELETE /api/v1.0/vouchers/{voucherId}/menu/{menuId}/store/{storeId}/metadata/{key} Delete voucher metadata
    Flipdish.VouchersApi getVoucherById GET /api/v1.0/vouchers/{voucherId} Get voucher by identifier
    Flipdish.VouchersApi getVoucherMetadata GET /api/v1.0/vouchers/{voucherId}/menu/{menuId}/store/{storeId}/metadata Get voucher metadata
    Flipdish.VouchersApi getVoucherMetadata_0 GET /api/v1.0/vouchers/{voucherId}/menu/{menuId}/store/{storeId}/metadata/{key} Get voucher metadata
    Flipdish.VouchersApi getVouchers GET /api/v1.0/vouchers Get vouchers
    Flipdish.VouchersApi setVoucherMetadata PUT /api/v1.0/vouchers/{voucherId}/menu/{menuId}/store/{storeId}/metadata/{key} Add voucher metadata
    Flipdish.WebhooksApi craeteWebhookSubscription POST /api/v1.0/webhooks/{clientId}/subscriptions Create a webhook subscription for you Oauth client
    Flipdish.WebhooksApi createWebhookSubscriptionEventNames POST /api/v1.0/webhooks/{clientId}/subscriptions/{webhookSubscriptionId}/events/{eventName} Add event name to your webhook subscription
    Flipdish.WebhooksApi deleteWebhookSubscription DELETE /api/v1.0/webhooks/{clientId}/subscriptions/{webhookSubscriptionId} Delete you webhook subscription
    Flipdish.WebhooksApi deleteWebhookSubscriptionEventName DELETE /api/v1.0/webhooks/{clientId}/subscriptions/{webhookSubscriptionId}/events/{eventName} Remove event name to your webhook subscription
    Flipdish.WebhooksApi getWebhookEventNames GET /api/v1.0/webhooks/events Get all webhook subscription event names
    Flipdish.WebhooksApi getWebhookEventNamesBySubscriptionId GET /api/v1.0/webhooks/{clientId}/subscriptions/{webhookSubscriptionId}/events Get your webhook subscriptions selected event names
    Flipdish.WebhooksApi getWebhookLogs GET /api/v1.0/webhooks/{clientId}/subscriptions/{webhookSubscriptionId}/logs Get logs for your webhook subscription
    Flipdish.WebhooksApi getWebhookSubscriptions GET /api/v1.0/webhooks/{clientId}/subscriptions Get all webhook subscriptions by your Oauth client id
    Flipdish.WebhooksApi updateWebhookSubscription PUT /api/v1.0/webhooks/{clientId}/subscriptions/{webhookSubscriptionId} Update a webhook subscription object

    Documentation for Models

    Documentation for Authorization

    oauth2

    Install

    npm i @flipdish/api-client-javascript

    DownloadsWeekly Downloads

    407

    Version

    1.0.115

    License

    Unlicense

    Unpacked Size

    5.39 MB

    Total Files

    2044

    Last publish

    Collaborators

    • mrinalmech
    • blaawolf
    • alainjacomet