Skip to content

gridly-spreadsheet-CMS/gridly-netcore-sdk

Repository files navigation

Com.Gridly - the C# library for the Gridly API

Gridly API documentation

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

  • API version: 4.33.0
  • SDK version: 1.3.0
  • Build package: org.openapitools.codegen.languages.CSharpNetCoreClientCodegen For more information, please visit https://www.gridly.com

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 Com.Gridly.Api;
using Com.Gridly.Client;
using Com.Gridly.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 Com.Gridly.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 Com.Gridly.Api;
using Com.Gridly.Client;
using Com.Gridly.Model;

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

            Configuration config = new Configuration();
            config.BasePath = "https://api.gridly.com";
            // Configure API key authorization: ApiKey
            config.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // config.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new BranchApi(config);
            var createBranch = new CreateBranch(); // CreateBranch | 
            var gridId = "gridId_example";  // string | gridId (optional) 
            var branchId = "branchId_example";  // string | branchId (optional) 

            try
            {
                // create
                Branch result = apiInstance.Create(createBranch, gridId, branchId);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling BranchApi.Create: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }

        }
    }
}

Documentation for API Endpoints

All URIs are relative to https://api.gridly.com

Class Method HTTP request Description
BranchApi Create POST /v1/branches create
BranchApi CreateDiffCheck POST /v1/branches/diffcheck createDiffCheck
BranchApi Delete DELETE /v1/branches/{branchId} delete
BranchApi Get GET /v1/branches/{branchId} get
BranchApi GetDiffCheck GET /v1/branches/diffcheck/{taskId} getDiffCheck
BranchApi List GET /v1/branches list
BranchApi Merge POST /v1/branches/{branchId}/merge merge
DatabaseApi Create POST /v1/databases create
DatabaseApi Delete DELETE /v1/databases/{dbId} delete
DatabaseApi Duplicate POST /v1/databases/{dbId}/duplicate duplicate
DatabaseApi Get GET /v1/databases/{dbId} get
DatabaseApi List GET /v1/databases list
DatabaseApi Update PUT /v1/databases/{dbId} update
GlossaryApi Create POST /v1/glossaries Create a new glossary
GlossaryApi Delete DELETE /v1/glossaries/{id} Delete a glossary
GlossaryApi ExportFile GET /v1/glossaries/{id}/export Export a glossary
GlossaryApi Get GET /v1/glossaries/{id} get glossary info
GlossaryApi GetAll GET /v1/glossaries List all glossaries
GlossaryApi ImportFile POST /v1/glossaries/{id}/import Import a glossary from file
GlossaryApi Update PUT /v1/glossaries/{id} Update glossary info
GridApi Create POST /v1/grids create
GridApi CreateCategory POST /v1/grids/{gridId}/settings/categories createCategory
GridApi Delete DELETE /v1/grids/{gridId} delete
GridApi DeleteCategory DELETE /v1/grids/{gridId}/settings/categories/{categoryId} deleteCategory
GridApi DeleteFile DELETE /v1/grids/{gridId}/settings/categories/{categoryId}/files/{fileId} deleteFile
GridApi Get GET /v1/grids/{gridId} get
GridApi GetSetting GET /v1/grids/{gridId}/settings getSetting
GridApi List GET /v1/grids list
GridApi ListFiles GET /v1/grids/{gridId}/settings/files listFiles
GridApi ListTemplateGrids GET /v1/template-grids listTemplateGrids
GridApi Update PATCH /v1/grids/{gridId} update
GridApi UpdateCategory PUT /v1/grids/{gridId}/settings/categories/{categoryId} updateCategory
GridApi UpdateSetting PATCH /v1/grids/{gridId}/settings updateSetting
GridApi UploadSettingFile POST /v1/grids/{gridId}/settings/categories/{categoryId}/files uploadSettingFile
PathApi Create POST /v1/views/{viewId}/paths create
PathApi Delete DELETE /v1/views/{viewId}/paths delete
PathApi List GET /v1/views/{viewId}/paths/tree list
PathApi Move POST /v1/views/{viewId}/paths/move move
PathApi Update PUT /v1/views/{viewId}/paths/{path} update
ProjectApi Create POST /v1/projects create
ProjectApi Delete DELETE /v1/projects/{projectId} delete
ProjectApi FindOne GET /v1/projects/{projectId} findOne
ProjectApi List GET /v1/projects list
ProjectApi Update PUT /v1/projects/{projectId} update
RecordApi Create POST /v1/views/{viewId}/records create
RecordApi Delete DELETE /v1/views/{viewId}/records delete
RecordApi Fetch GET /v1/views/{viewId}/records fetch
RecordApi FetchHistories GET /v1/views/{viewId}/records/{recordId}/histories fetchHistories
RecordApi Update PATCH /v1/views/{viewId}/records update
RecordApi UpdateRecord PATCH /v1/views/{viewId}/records/{id} updateRecord
ShareViewApi Create PUT /v1/views/{viewId}/shares create
ShareViewApi Delete DELETE /v1/views/{viewId}/shares delete
ShareViewApi Get GET /v1/views/{viewId}/shares get
TaskApi Get GET /v1/tasks/{taskId} get
TransmemApi Cleanup PUT /v1/transmems/{tmId}/cleanup Erases all the translation data of the provided tmId
TransmemApi Create POST /v1/transmems Create a new translation memory
TransmemApi CreateWithFile POST /v1/transmems/upload Create a new translation memory by uploading tmx file
TransmemApi Delete DELETE /v1/transmems/{tmId} Delete a translation memory by id
TransmemApi Export GET /v1/transmems/{tmId}/export Export translation memory tmx file
TransmemApi Get GET /v1/transmems/{tmId} Get translation memory info by id
TransmemApi ImportTmx POST /v1/transmems/{tmId}/import Import a translation memory from tmx file
TransmemApi ListTM GET /v1/transmems List all available translation memories or create default one if there is no translation memory
TransmemApi Update PUT /v1/transmems/{tmId} Update a translation memory
ViewApi Create POST /v1/views create
ViewApi Export GET /v1/views/{viewId}/export export
ViewApi Get GET /v1/views/{viewId} get
ViewApi GetStatistic GET /v1/views/{viewId}/statistic getStatistic
ViewApi ImportView POST /v1/views/{viewId}/import importView
ViewApi List GET /v1/views list
ViewApi Merge POST /v1/views/{viewId}/merge merge
ViewColumnApi Add POST /v1/views/{viewId}/columns/{columnId}/add add
ViewColumnApi BulkCreate POST /v1/views/{viewId}/columns/bulk bulkCreate
ViewColumnApi Create POST /v1/views/{viewId}/columns create
ViewColumnApi Delete DELETE /v1/views/{viewId}/columns/{columnId} delete
ViewColumnApi Get GET /v1/views/{viewId}/columns/{columnId} get
ViewColumnApi Remove POST /v1/views/{viewId}/columns/{columnId}/remove remove
ViewColumnApi Update PATCH /v1/views/{viewId}/columns/{columnId} update
ViewDependencyApi Create POST /v1/views/{viewId}/dependencies create
ViewDependencyApi Delete DELETE /v1/views/{viewId}/dependencies delete
ViewDependencyApi DeleteById DELETE /v1/views/{viewId}/dependencies/{dependencyId} deleteById
ViewDependencyApi Get GET /v1/views/{viewId}/dependencies/{dependencyId} get
ViewDependencyApi List GET /v1/views/{viewId}/dependencies list
ViewDependencyApi Update PUT /v1/views/{viewId}/dependencies/{dependencyId} update
ViewFileApi Delete DELETE /v1/views/{viewId}/files delete
ViewFileApi Download GET /v1/views/{viewId}/files/{fileId} download
ViewFileApi Upload POST /v1/views/{viewId}/files upload
ViewFileApi UploadZip POST /v1/views/{viewId}/files/zip uploadZip

Documentation for Models

Documentation for Authorization

ApiKey

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