Flipdish SDK

You can access the API Swagger file at https://api.flipdish.co/swagger/docs/v1.0
This will allow you to generate SDKs in many programming languages. Alternatively you can use the pre-generated SDKs below.

.NET

Download our .NET SDK as nuget package or fork our Github repository

Installation

PM> Install-Package Flipdish
> dotnet add package Flipdish --version 1.0.22
> paket add Flipdish

Usage

using System;
using System.Diagnostics;
using Flipdish.Api;
using Flipdish.Client;
using Flipdish.Model;

namespace Example
{
    public class GetStoresExample
    {
        public void main()
        {
            // Configure OAuth2 access token for authorization: oauth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new StoresApi();
            var searchQuery = searchQuery_example;  // string | Search query (optional) 
            var page = 1;  // int? | Requested page index (optional) 
            var limit = 50;  // int? | Requested page limit (optional) 

            try
            {
                // Get all stores
                RestApiPaginationResultStore result = apiInstance.GetStores(searchQuery, page, limit);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling StoresApi.GetStores: " + e.ToString());
            }
        }
    }
}

.NET Core

Download our .NET Core SDK as nuget package

Installation

Install-Package Flipdish.Core -Version 1.1.50
dotnet add package Flipdish.Core --version 1.1.50
paket add Flipdish.Core --version 1.1.50

Usage

using System.Collections.Generic;
using System.Diagnostics;
using Flipdish.Api;
using Flipdish.Client;
using Flipdish.Model;

namespace Example
{
    public class GetStoresExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://api-int-team.portal.flipdishdev.com";
            // Configure OAuth2 access token for authorization: oauth2
            config.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new StoresApi(config);
            var searchQuery = searchQuery_example;  // string | Search query (optional) 
            var page = 56;  // int? | Requested page index (optional) 
            var limit = 56;  // int? | Requested page limit (optional) 
            var storeGroupId = 56;  // int? | Store Group Id (optional) 

            try
            {
                // Get all stores, excluding archived ones
                RestApiPaginationResultStore result = apiInstance.GetStores(searchQuery, page, limit, storeGroupId);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling StoresApi.GetStores: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

JavaScript

Download our JavaScript SDK as npm package or fork our Github repository

Installation

npm install @flipdish/api-client-javascript --save

Usage

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 apiInstance = new Flipdish.StoresApi();

var opts = { 
  'searchQuery': "mexican cafe", // String | Search query
  'page': 1, // Number | Requested page index
  'limit': 20 // Number | Requested page limit
};

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

Node with TypeScript

Download our Node with Typescript SDK as npm package or fork our Github repository

Installation

npm install @flipdish/api-client-typescript --save
yarn add @flipdish/api-client-typescript
bower install @flipdish/api-client-typescript --save

Usage

import { StoresApi } from '@flipdish/api-client-typescript';
 
let storesApi = new StoresApi();
storesApi.accessToken = '<your_access_token>';
storesApi.getStores('mexican cafe', 1, 20)
.then(response => {
        response.body.Data.map(store => console.log(store));
    }).catch(error => {
        console.error(error);    
    });