Apigum.Sdk 1.0.6

dotnet add package Apigum.Sdk --version 1.0.6
NuGet\Install-Package Apigum.Sdk -Version 1.0.6
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Apigum.Sdk" Version="1.0.6" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Apigum.Sdk --version 1.0.6
#r "nuget: Apigum.Sdk, 1.0.6"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Apigum.Sdk as a Cake Addin
#addin nuget:?package=Apigum.Sdk&version=1.0.6

// Install Apigum.Sdk as a Cake Tool
#tool nuget:?package=Apigum.Sdk&version=1.0.6

ApiGum.Sdk

NuGet

ApiGum SDK is a .Net library for managing integrations between popular cloud applications like Twilio, SendGrid, Shopify and others.

Installation

  • ApiGum SDK is available as a NuGet Package.

  • In your Visual Studio click on Tools → NuGet Package Manager → Package Manager Console and enter the following

    PM> Install-Package ApiGum.Sdk

Usage

  • Log into your apigum.com account to obtain your API Key.
  • You'll also need to obtain the relevant application keys. For example secret key for Stripe or Subdomain and Api Key for Freshdesk.
  • This library makes calls to the apigum REST API.
  • This SDK includes a current snapshot of supported integrations. This of course can be overriden by picking up new integration ids @ apigum.com.

Namespaces

All examples here are written as if you've added the following using statements to your file...

using Apigum.Sdk;
using Apigum.Sdk.Generation;
using Apigum.Sdk.Helpers;

Setup

  //obtain api key at https://account.apigum.com/api
  var integration = new Integration(new Guid("your api key"));

  //intructions for obtaining credentials for Stripe & Freshdesk can be found on vendor sites or apigum integration page:
  //for example https://www.apigum.com/Integrations/6c6c6398-b628-450d-9faf-667d89113ed5

  //set up Freshdesk credentials
  var FreshdeskCrentials = new Dictionary<string, string>();
  FreshdeskCrentials.Add(Apps.Freshdesk.Keys.Apikey, "your Freshdesk api key");
  FreshdeskCrentials.Add(Apps.Freshdesk.Keys.Subdomain, "your Freshdesk subdomain");

  //set up Stripe credentials
  var StripeCrentials = new Dictionary<string, string>();
  StripeCrentials.Add(Apps.Stripe.Keys.Secretkey, "your Stripe secret key");

Create Integration

  var freshdesk = AppHelper.Configure(Apps.Freshdesk.AppId, FreshdeskCrentials);
  var stripe = AppHelper.Configure(Apps.Stripe.AppId, StripeCrentials);

  //save integration id for later use
  var integrationId = Integration.Create(freshdesk, stripe,
                      Apps.Freshdesk.Integrations.CREATE_FRESHDESK_CONTACT_FOR_NEW_STRIPE_CUSTOMERS);

  //You may clone other integrations on apigum.com by using the id (last part) in the URL:
  //e.g.: https://www.apigum.com/Integrations/{integration-id}

Update Integration

    var script = System.IO.File.ReadAllText("integration.js");
    var integrationId = new Guid("<Integration Id>");
    Integration.UpdateScript(integrationId, script);            
Sample integration.js
//Integration code for => "Create Freshdesk contact for new Stripe customers"
  var freshdesk={};

  function setElements(stripe) {
      freshdesk.name = stripe.description;
      freshdesk.email = stripe.email;

  }

  function template() {
      return `{
    "name": "${freshdesk.name}",
    "email": "${freshdesk.email}",
    "other_emails": []
  }`;
  }

  module.exports = function (context, events) {

      let actions = [];

      for (let event of events.body) {
          setElements(event);
          actions.push(template());
      }

      context.res = {
          body: actions
      };

      context.done();
  };            

Delete Integration

  Integration.Delete(new Guid("<Integration Id>"));

Start Running

  //by default integrations start running when created
  //this method may be used if integration has been stopped.
  Integration.Publish(new Guid("<Integration Id>"));

Stop Running

  //suspends integration data synchronization
  Integration.Unpublish(new Guid("<Integration Id>"));

For product information please visit our site at https://www.apigum.com

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.0 is compatible.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.6 814 10/28/2018