Skip to content

persona94/csharp-sdk

 
 

Repository files navigation

freeclimb - the C# library for the FreeClimb API

FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request.

This C# SDK is automatically generated by the OpenAPI Generator project:

  • API version: 1.0.0
  • SDK version: 4.1.1
  • Build package: org.openapitools.codegen.languages.CSharpNetCoreClientCodegen For more information, please visit https://www.freeclimb.com/support/

Frameworks supported

Dependencies

The DLLs included in the package may not be the latest version. We recommend using NuGet to obtain the latest version of the packages:

Install-Package RestSharp
Install-Package Newtonsoft.Json
Install-Package JsonSubTypes
Install-Package System.ComponentModel.Annotations

NOTE: RestSharp versions greater than 105.1.0 have a bug which causes file uploads to fail. See RestSharp#742. NOTE: RestSharp for .Net Core creates a new socket for each api call, which can lead to a socket exhaustion problem. See RestSharp#1406.

Installation

Run the following command to generate the DLL

  • [Mac/Linux] /bin/sh build.sh
  • [Windows] build.bat

Then include the DLL (under the bin folder) in the C# project, and use the namespaces:

using freeclimb.Api;
using freeclimb.Client;
using freeclimb.Model;

Packaging

A .nuspec is included with the project. You can follow the Nuget quickstart to create and publish packages.

This .nuspec uses placeholders from the .csproj, so build the .csproj directly:

nuget pack -Build -OutputDirectory out freeclimb.csproj

Then, publish to a local feed or other host and consume the new package via Nuget as usual.

Usage

To use the API client with a HTTP proxy, setup a System.Net.WebProxy

Configuration c = new Configuration();
System.Net.WebProxy webProxy = new System.Net.WebProxy("http://myProxyUrl:80/");
webProxy.Credentials = System.Net.CredentialCache.DefaultCredentials;
c.Proxy = webProxy;

Getting Started

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

namespace Example
{
    public class Example
    {
        public static void Main()
        {

            Configuration config = new Configuration();
            config.BasePath = "https://www.freeclimb.com/apiserver";
            // Configure HTTP basic authorization: fc
            config.Username = "YOUR_ACCOUNT_ID";
            config.Password = "YOUR_API_KEY";

            var apiInstance = new DefaultApi(config);
            
            var buyIncomingNumberRequest = new BuyIncomingNumberRequest(); // BuyIncomingNumberRequest | Incoming Number transaction details

            try
            {
                // Buy a Phone Number
                IncomingNumberResult result = apiInstance.BuyAPhoneNumber(buyIncomingNumberRequest);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling DefaultApi.BuyAPhoneNumber: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }

        }
    }
}

Documentation for API Endpoints

All URIs are relative to https://www.freeclimb.com/apiserver

Class Method HTTP request Description
DefaultApi BuyAPhoneNumber POST /Accounts/{accountId}/IncomingPhoneNumbers Buy a Phone Number
DefaultApi CreateAConference POST /Accounts/{accountId}/Conferences Create a Conference
DefaultApi CreateAQueue POST /Accounts/{accountId}/Queues Create a Queue
DefaultApi CreateAnApplication POST /Accounts/{accountId}/Applications Create an application
DefaultApi DeleteARecording DELETE /Accounts/{accountId}/Recordings/{recordingId} Delete a Recording
DefaultApi DeleteAnApplication DELETE /Accounts/{accountId}/Applications/{applicationId} Delete an application
DefaultApi DeleteAnIncomingNumber DELETE /Accounts/{accountId}/IncomingPhoneNumbers/{phoneNumberId} Delete an Incoming Number
DefaultApi DequeueAMember POST /Accounts/{accountId}/Queues/{queueId}/Members/{callId} Dequeue a Member
DefaultApi DequeueHeadMember POST /Accounts/{accountId}/Queues/{queueId}/Members/Front Dequeue Head Member
DefaultApi DownloadARecordingFile GET /Accounts/{accountId}/Recordings/{recordingId}/Download Download a Recording File
DefaultApi FilterLogs POST /Accounts/{accountId}/Logs Filter Logs
DefaultApi GetACall GET /Accounts/{accountId}/Calls/{callId} Get a Call
DefaultApi GetAConference GET /Accounts/{accountId}/Conferences/{conferenceId} Get a Conference
DefaultApi GetAMember GET /Accounts/{accountId}/Queues/{queueId}/Members/{callId} Get a Member
DefaultApi GetAParticipant GET /Accounts/{accountId}/Conferences/{conferenceId}/Participants/{callId} Get a Participant
DefaultApi GetAQueue GET /Accounts/{accountId}/Queues/{queueId} Get a Queue
DefaultApi GetARecording GET /Accounts/{accountId}/Recordings/{recordingId} Get a Recording
DefaultApi GetAnAccount GET /Accounts/{accountId} Get an Account
DefaultApi GetAnApplication GET /Accounts/{accountId}/Applications/{applicationId} Get an Application
DefaultApi GetAnIncomingNumber GET /Accounts/{accountId}/IncomingPhoneNumbers/{phoneNumberId} Get an Incoming Number
DefaultApi GetAnSmsMessage GET /Accounts/{accountId}/Messages/{messageId} Get an SMS Message
DefaultApi GetHeadMember GET /Accounts/{accountId}/Queues/{queueId}/Members/Front Get Head Member
DefaultApi ListActiveQueues GET /Accounts/{accountId}/Queues List Active Queues
DefaultApi ListAllAccountLogs GET /Accounts/{accountId}/Logs List All Account Logs
DefaultApi ListApplications GET /Accounts/{accountId}/Applications List applications
DefaultApi ListAvailableNumbers GET /AvailablePhoneNumbers List available numbers
DefaultApi ListCallLogs GET /Accounts/{accountId}/Calls/{callId}/Logs List Call Logs
DefaultApi ListCallRecordings GET /Accounts/{accountId}/Calls/{callId}/Recordings List Call Recordings
DefaultApi ListCalls GET /Accounts/{accountId}/Calls List Calls
DefaultApi ListConferences GET /Accounts/{accountId}/Conferences List Conferences
DefaultApi ListIncomingNumbers GET /Accounts/{accountId}/IncomingPhoneNumbers List Incoming Numbers
DefaultApi ListMembers GET /Accounts/{accountId}/Queues/{queueId}/Members List Members
DefaultApi ListParticipants GET /Accounts/{accountId}/Conferences/{conferenceId}/Participants List Participants
DefaultApi ListRecordings GET /Accounts/{accountId}/Recordings List Recordings
DefaultApi ListSmsMessages GET /Accounts/{accountId}/Messages List SMS Messages
DefaultApi MakeACall POST /Accounts/{accountId}/Calls Make a Call
DefaultApi RemoveAParticipant DELETE /Accounts/{accountId}/Conferences/{conferenceId}/Participants/{callId} Remove a Participant
DefaultApi SendAnSmsMessage POST /Accounts/{accountId}/Messages Send an SMS Message
DefaultApi StreamARecordingFile GET /Accounts/{accountId}/Recordings/{recordingId}/Stream Stream a Recording File
DefaultApi UpdateAConference POST /Accounts/{accountId}/Conferences/{conferenceId} Update a Conference
DefaultApi UpdateALiveCall POST /Accounts/{accountId}/Calls/{callId} Update a Live Call
DefaultApi UpdateAParticipant POST /Accounts/{accountId}/Conferences/{conferenceId}/Participants/{callId} Update a Participant
DefaultApi UpdateAQueue POST /Accounts/{accountId}/Queues/{queueId} Update a Queue
DefaultApi UpdateAnAccount POST /Accounts/{accountId} Manage an account
DefaultApi UpdateAnApplication POST /Accounts/{accountId}/Applications/{applicationId} Update an application
DefaultApi UpdateAnIncomingNumber POST /Accounts/{accountId}/IncomingPhoneNumbers/{phoneNumberId} Update an Incoming Number

Documentation for Models

Documentation for Authorization

fc

  • Type: HTTP basic authentication

About

C# SDK for the FreeClimb API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 99.9%
  • Shell 0.1%