Skip to content

IvAlex1986/MateCat.Net

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MateCat.Net

MateCat.Net is a wrapper made for .NET, which works with online CAT-Tool MateCat.

The official documentation of using API see here.

Build Status

Build Status

Installation

Installation is performed via NuGet package.

PM> Install-Package MateCat.Net

Example

Creating new MateCat project:

using MateCat.Net.Enums;
using MateCat.Net.Models;
using System.Collections.Generic;

namespace MateCat.Net.Example
{
    public class CreateProjectExample
    {
        private readonly MateCatApi _mateCatApi = new MateCatApi();

        public Project RunCreateProjectExample()
        {
            List<ProjectFile> projectFiles = new List<ProjectFile> { new ProjectFile(@"C:\Temp\Example.txt") };
            Project project = _mateCatApi.CreateProject(projectFiles, "TestProjectName", "en-EN", "ru-RU", SupportedSubject.Internet);
            return project;
        }
    }
}

Changing MateCat project password:

using MateCat.Net.Models;

namespace MateCat.Net.Example
{
    public class ChangeProjectPasswordExample
    {
        private readonly MateCatApi _mateCatApi = new MateCatApi();

        public Project RunChangeProjectPasswordExample()
        {
            Project project = new CreateProjectExample().RunCreateProjectExample();
            project = _mateCatApi.ChangeProjectPassword(project.Id, project.Password, "MY_NEW_PASSWORD");
            return project;
        }
    }
}

Receiving MateCat project status:

using MateCat.Net.Models;

namespace MateCat.Net.Example
{
    public class GetProjectStatusExample
    {
        private readonly MateCatApi _mateCatApi = new MateCatApi();

        public ProjectStatus RunGetProjectStatusExample()
        {
            Project project = new CreateProjectExample().RunCreateProjectExample();
            ProjectStatus projectStatus = _mateCatApi.GetProjectStatus(project.Id, project.Password);
            return projectStatus;
        }
    }
}

License

This project is licensed under the MIT license.

About

MateCat API wrapper for .NET

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages