Intercom-NET 0.3.15-alpha

This is a prerelease version of Intercom-NET.
dotnet add package Intercom-NET --version 0.3.15-alpha
                    
NuGet\Install-Package Intercom-NET -Version 0.3.15-alpha
                    
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="Intercom-NET" Version="0.3.15-alpha" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Intercom-NET" Version="0.3.15-alpha" />
                    
Directory.Packages.props
<PackageReference Include="Intercom-NET" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Intercom-NET --version 0.3.15-alpha
                    
#r "nuget: Intercom-NET, 0.3.15-alpha"
                    
#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.
#:package Intercom-NET@0.3.15-alpha
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Intercom-NET&version=0.3.15-alpha&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Intercom-NET&version=0.3.15-alpha&prerelease
                    
Install as a Cake Tool

Intercom API client library for .NET

Nuget Nuget

Supported APIs

Install

You can download the intercom client nuget. https://www.nuget.org/packages/Intercom

Usage

For the full documentation please read our wiki!

Simple

If you're using .NET (former .NET Core) and utilizing the default hosting and startup pattern (Microsoft.Extensions.Hosting) you use Intercom.Extensions.Hosting.

The easiest way to use the client is to run .Configure(), this will create a static instance (Intercom) of the client that can be used throughout your application.

The Configure() method can be initiated in two ways,

  • Intercom.Configure("baseUri", "bearerToken")
  • Intercom.Configure("baseUri", "bearerToken", apiVersion)
Examples
using Intercom.Constants;
using Intercom.Models;
using Intercom.Request.Companies;

Intercom.Configure(Url.Production, "bearerToken");

var company = new Company
{
    Name = "Obscured",
    CompanyId = "Obscured_1",
    Plan = new Plan
    {
        Name = "Enterprise"
    },
    Size = 10,
    Attributes = new Dictionary<string, object>
    {
        {"foo", "bar"},
        {"bar", "foo"}
    }
};
var request = new UpsertRequest(company);
var response = Intercom.Companies.Upsert(request)

using Intercom.Constants;
using Intercom.Models;
using Intercom.Request.Companies;

Intercom.Configure(Url.Production, "bearerToken", Version.Latest)

var company = new Company
{
    Name = "Obscured",
    CompanyId = "Obscured_1",
    Plan = new Plan
    {
        Name = "Enterprise"
    },
    Size = 10,
    Attributes = new Dictionary<string, object>
    {
        {"foo", "bar"},
        {"bar", "foo"}
    }
};
var request = new UpsertRequest(company);
var response = Intercom.Companies.Upsert(request)

Advanced

If you only need access to one (or a few) clients you're able to configure each client individually.

Examples
using Intercom.Constants;
using Intercom.Models;
using Intercom.Request.Companies;

public class SomeClass
{
    private readonly ICompaniesClient _client;

    public SomeClass()
    {
        _client = new CompaniesClient(Url.Production, "bearerToken")
    }

    public Company Upsert()
    {
        var company = new Company
        {
            Name = "Obscured",
            CompanyId = "Obscured_1",
            Plan = new Plan
            {
                Name = "Enterprise"
            },
            Size = 10,
            Attributes = new Dictionary<string, object>
            {
                {"foo", "bar"},
                {"bar", "foo"}
            }
        };
        var request = new UpsertRequest(company);
        var response = Intercom.Companies.Upsert(request)

        return response;
    }

    public async Task<Company> UpsertAsync()
    {
        var company = new Company
        {
            Name = "Obscured",
            CompanyId = "Obscured_1",
            Plan = new Plan
            {
                Name = "Enterprise"
            },
            Size = 10,
            Attributes = new Dictionary<string, object>
            {
                {"foo", "bar"},
                {"bar", "foo"}
            }
        };
        var request = new UpsertRequest(company);
        var response = await Intercom.Companies.UpsertAsync(request)

        return response;
    }
}
using Intercom.Constants;
using Intercom.Models;
using Intercom.Request.Companies;

public class SomeClass
{
    private readonly ICompaniesClient _client;

    public SomeClass()
    {
        _client = new CompaniesClient(Url.Production, "bearerToken", Version.Latest)
    }
    
    public Company Upsert()
    {
        var company = new Company
        {
            Name = "Obscured",
            CompanyId = "Obscured_1",
            Plan = new Plan
            {
                Name = "Enterprise"
            },
            Size = 10,
            Attributes = new Dictionary<string, object>
            {
                {"foo", "bar"},
                {"bar", "foo"}
            }
        };
        var request = new UpsertRequest(company);
        var response = Intercom.Companies.Upsert(request)

        return response;
    }

    public async Task<Company> UpsertAsync()
    {
        var company = new Company
        {
            Name = "Obscured",
            CompanyId = "Obscured_1",
            Plan = new Plan
            {
                Name = "Enterprise"
            },
            Size = 10,
            Attributes = new Dictionary<string, object>
            {
                {"foo", "bar"},
                {"bar", "foo"}
            }
        };
        var request = new UpsertRequest(company);
        var response = await Intercom.Companies.UpsertAsync(request)

        return response;
    }
}

Constants

Url

The url constant is used to identify what production environment that will be used.

  • Production => "https://api.intercom.io/"
  • ProductionAustralia => "https://api.au.intercom.io/"
  • ProductionEurope => "https://api.eu.intercom.io/"
Version

The version constant is used to identify what Intercom API version (Intercom-Version header) will be used, Latest always points to the highest available.

  • Latest
  • Version_2_9
  • Version_2_8
  • Version_2_7

Development

TODO

Contributing

Pull requests and features are happily considered! By participating in this project you agree to abide by the Code of Conduct.

To contribute

Fork, then clone the repo:

git clone git@github.com:your-username/Intercom.git

Push to your fork and submit a pull request

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 is compatible.  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 is compatible.  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 is compatible.  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.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 is compatible. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Intercom-NET:

Package Downloads
Intercom.Extensions.Hosting

Hosting and startup abstractions for Intercom. When using NuGet 3.x this package requires at least version 3.4...

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.3.15-alpha 1,652 11/22/2023
0.3.14-alpha 1,805 7/11/2023
0.1.8-alpha 134 6/27/2023
0.1.7-alpha 125 6/27/2023