Skip to content

francescocaveglia/OneSky.CSharp

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

OneSky.CSharp

C# client for OneSky API.

Information

Installation

Install NuGet package:

  1. Run Install-Package OneSky.CSharp in the Package Manager Console
  2. Or find package in NuGet Package Manager

Or just Pull & Compile

Dependencies

  • Newtonsoft.Json [For JSON interaction]

Quick Start

// Creating OneSky Client
var oneskyClient = OneSky.CSharp.Json.OneSkyClient.CreateClient(
    "Your public API key",
    "Your secret API key");

// Creating 'Project Group' and 'Project'
var projectGroup = oneskyClient.Platform.ProjectGroup
    .Create("QuickStart group", "by" /*your locale*/).Data;
var project = oneskyClient.Platform.Project
    .Create(projectGroup.Id, "QuickStart project").Data;

// Uploading 2 files - for base locale and for 'en' locale
oneskyClient.Platform.File
    .Upload(project.Id, "Path/To/Your/File.ext", "INI" /*or your file format*/);
oneskyClient.Platform.File
    .Upload(project.Id, "Path/To/Your/File.InEn.ext", "INI", "en");

// Downloading tranlsation for specific locale ('en') and saving it to file
var translation = oneskyClient.Platform.Translation
    .Export(project.Id, "en", "File.ext").Data;
System.IO.File.WriteAllBytes(
    "Path/To/Save/Translation.ext",
    Encoding.UTF8.GetBytes(translation));

To find your API keys please go to OneSky Support page.

For more information go to Wiki (Soon)

Documentation

Credits

Repository

Repository Structure

  • OneSky.CSharp: Main library project.
  • OneSky.CSharp.Tests: Tests for main library [Depends on xUnit and FluentAssertions].

Contribution

  • Pull requests are very welcome! Don't forget to use separate branch for each separate pull request.
  • If you have an idea, found bug or have a question - feel free to create new Issue

Tests

This lib is covered by tests (partially) located in OneSky.CSharp.Tests.

To run this tests in VS - build solution, open Test Explorer window (Alt, S, W, T), click 'Run All..'. Or use any test runner you're familiar with.

License

MIT

About

C# client for OneSky API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 100.0%