The VisWiz.io C# SDK
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.swagger-codegen
docs
src
.gitignore
.swagger-codegen-ignore
.travis.yml
README.md
VisWiz.SDK.sln
build.bat
build.sh
mono_nunit_test.sh

README.md

VisWiz.io C# SDK

This SDK allows you to query and create new projects, builds or images within the VisWiz service.

This C# SDK is automatically generated by the Swagger Codegen project:

  • API version: 1.1.0
  • SDK version: 1.0.0
  • Build package: io.swagger.codegen.languages.CSharpClientCodegen

For more information, please visit https://www.viswiz.io

Frameworks supported

  • .NET 4.0 or later
  • Windows Phone 7.1 (Mango)

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

NOTE: RestSharp versions greater than 105.1.0 have a bug which causes file uploads to fail. See RestSharp#742

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 VisWiz.SDK.Client;
using VisWiz.SDK.Client;
using VisWiz.SDK.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 VisWiz.SDK.csproj

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

Getting Started

using System;
using System.Diagnostics;
using VisWiz.SDK.Client;
using VisWiz.SDK.Client;
using VisWiz.SDK.Model;

namespace Example
{
    public class Example
    {
        public void main()
        {

            // Configure API key authorization: api_key
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new ProjectsApi();

            try
            {
                InlineResponse2002 result = apiInstance.GetProjects();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ProjectsApi.GetProjects: " + e.Message );
            }

        }
    }
}

Documentation for API Endpoints

All URIs are relative to https://api.viswiz.io

Class Method HTTP request Description
AccountApi CreateWebhook POST /webhooks Create a new webhook
AccountApi GetAccount GET /account Get account info
AccountApi GetWebhooks GET /webhooks Get all webhooks
BuildsApi CreateBuild POST /projects/{projectID}/builds Create a build
BuildsApi FinishBuild POST /builds/{buildID}/finish Finish a build
BuildsApi GetBuildResults GET /builds/{buildID}/results Get results for a build
BuildsApi GetBuilds GET /projects/{projectID}/builds Get builds for a project
ImagesApi CreateImage POST /builds/{buildID}/images Create an image
ImagesApi GetImages GET /builds/{buildID}/images Get images for a build
PlansApi CancelPlan DELETE /account/cancel-plan Cancel the active plan
PlansApi GetPlans GET /plans Get all plans
ProjectsApi CreateProject POST /projects Create a project
ProjectsApi GetProjectNotifications GET /projects/{projectID}/notifications Get notifications settings
ProjectsApi GetProjects GET /projects Get all projects
ProjectsApi UpdateProjectNotifications PUT /projects/{projectID}/notifications Update notifications settings

Documentation for Models

Documentation for Authorization

api_key

  • Type: API key
  • API key parameter name: Authorization
  • Location: HTTP header