Giter Club home page Giter Club logo

smartsheet-csharp-sdk's Introduction

Smartsheet SDK for C# Build Status NuGet

C# SDK to simplify connecting to the Smartsheet API from .NET applications.

System Requirements

The SDK supports C# version 4.0 or later and targets .NET 6.0.

Installation

To add the SDK to a .Net project

dotnet add package smartsheet-csharp-sdk

Example Usage

To call the API, you will need an access token, which looks something like this example: ll352u9jujauoqz4gstvsae05. You can find the access token in the UI at Account > Personal Settings > API Access.

The following is a brief sample that shows you how to:

  • Initialize the client
  • List all sheets
  • Load one sheet
using Smartsheet.Api;
using Smartsheet.Api.Models;

static void Sample()
{
    SmartsheetClient smartsheet = new SmartsheetBuilder()
        // TODO: Set your API access in environment variable SMARTSHEET_ACCESS_TOKEN or else here
        // .SetAccessToken("JKlMNOpQ12RStUVwxYZAbcde3F5g6hijklM789")
        .Build();

    PaginatedResult<Sheet> sheets = smartsheet.SheetResources.ListSheets(null, null, null);
    Console.WriteLine("Found " + sheets.TotalCount + " sheets");

    long sheetId = (long) sheets.Data[0].Id;

    Console.WriteLine("Loading sheet id: " + sheetId);

    var sheet = smartsheet.SheetResources.GetSheet(sheetId, null, null, null, null, null, null, null);
    Console.WriteLine("Loaded " + sheet.Rows.Count + " rows from sheet: " + sheet.Name);
}

A simple, but complete sample application project is here: https://github.com/smartsheet-samples/csharp-read-write-sheet

Advanced Topics

For details about logging, testing, how to use a passthrough option, and how to override HTTP client behavior, see Advanced Topics.

Documentation

The full Smartsheet API documentation is here: https://smartsheet.redoc.ly.

The generated SDK class documentation is here: https://smartsheet.github.io/smartsheet-csharp-sdk/api/index.html.

Release Notes

All releases and release notes are available on Github or the NuGet repository.

Developer Agreement

Review the Developer Program Agreement.

Acknowledgements

We would like to thank the following people for their contributions to this project:

smartsheet-csharp-sdk's People

Contributors

abryan-smartsheet avatar activescott avatar bogdansireteanu avatar brentaiipllc avatar brettbatie avatar cameronbowie avatar coxito avatar ericspaghetti avatar fleighton avatar gpltaylor avatar jtp3xp avatar kbrandl avatar kfansler avatar lifebeyondfife avatar matsumiyat avatar nerfix avatar orthographic-pedant avatar rzaracota avatar seweil avatar stollgr avatar thijs4ef avatar timothodge avatar timwellswa avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.