OneCloudNet 1.0.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package OneCloudNet --version 1.0.1
NuGet\Install-Package OneCloudNet -Version 1.0.1
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="OneCloudNet" Version="1.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add OneCloudNet --version 1.0.1
#r "nuget: OneCloudNet, 1.0.1"
#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 OneCloudNet as a Cake Addin
#addin nuget:?package=OneCloudNet&version=1.0.1

// Install OneCloudNet as a Cake Tool
#tool nuget:?package=OneCloudNet&version=1.0.1

OneCloudNet

.Net client for 1cloud.ru service REST API.

NuGet AppVeyour

Installation (NuGet)

Install-Package OneCloudNet

Usage

OneCloudNetClient uses RestSharp.

API token

1cloud.ru service requires uinique user API token for authorization, which is added to each request.

String token = "75bb9805c018b1267b2cf599a38b95a3a811e2ef7ad9ca5ed838ea4c6bafaf50";
IOneCloudNetClient client = new OneCloudNetClient(token);

So far, supported methods are realized in two ways: Asynchronious calls:

void GetImages(Action<List<Image>> success, Action<OneCloudException> failure);
void GetServers(Action<List<Server>> success, Action<OneCloudException> failure);
void GetServer(Int32 serverID, Action<Server> success, Action<OneCloudException> failure);
void CreateServer(String name, Int32 cpu, Int32 ram, Int32 hdd, String imageID, Action<Server> success, Action<OneCloudException> failure);
void ChangeServer(Int32 serverID, Int32 cpu, Int32 ram, Int32 hdd, Action<Action> success, Action<OneCloudException> failure);
void DeleteServer(Int32 serverID, Action<IRestResponse> success, Action<OneCloudException> failure);
void PowerServer(Int32 serverID, Power type, Action<Action> success, Action<OneCloudException> failure);
void GetActions(Int32 serverID, Action<List<Action>> success, Action<OneCloudException> failure);
void GetAction(Int32 serverID, Int32 actionID, Action<Action> success, Action<OneCloudException> failure);

and synchronious calls:

IEnumerable<Image> GetImages();
IEnumerable<Server> GetServers();
Server GetServer(Int32 serverID);
Server CreateServer(String name, Int32 cpu, Int32 ram, Int32 hdd, String imageID);
Action ChangeServer(Int32 serverID, Int32 cpu, Int32 ram, Int32 hdd);
Boolean DeleteServer(Int32 serverID);
Action PowerServer(Int32 serverID, Power type);
IEnumerable<Action> GetActions(Int32 serverID);
Action GetAction(Int32 serverID, Int32 actionID);

More features and documentation are coming soon.

More information about 1cloud.ru service and API is available at the official website.

License

Code and documentation are available according to the Apache License (see LICENSE).

There are no supported framework assets in this 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.23 733 1/21/2019
1.0.22 695 1/17/2019
1.0.21 889 1/17/2019
1.0.1 1,456 2/11/2015

Very first release of the package.