{"__v":7,"_id":"55a93efb02becf2d007aac55","category":{"__v":6,"_id":"55a936b1cf45e1390093f362","pages":["55a936e3c8bd450d000dd1de","55a9390b4c661b3700cf4e21","55a93bd35d3abb0d0012f194","55a93cb702becf2d007aac47","55a93efb02becf2d007aac55","55a940d902becf2d007aac67"],"project":"55a7aee84a33f92b00b7a150","version":"55a7aee84a33f92b00b7a153","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-07-17T17:09:05.944Z","from_sync":false,"order":1,"slug":"sdks","title":"SDKs"},"parentDoc":null,"project":"55a7aee84a33f92b00b7a150","user":"55a7ae50bf1be93100d89df1","version":{"__v":6,"_id":"55a7aee84a33f92b00b7a153","project":"55a7aee84a33f92b00b7a150","createdAt":"2015-07-16T13:17:28.411Z","releaseDate":"2015-07-16T13:17:28.411Z","categories":["55a7aee94a33f92b00b7a154","55a7fefa3efe0c2f0074cbdf","55a8fb10c8bd450d000dd130","55a936b1cf45e1390093f362","55abddeaa36ccd0d00fdebe1","5624db675a86b423009462e1"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-07-17T17:44:27.787Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":6,"body":"Clone the [C# SDK](https://github.com/AYLIEN/aylien_textapi_csharp) from our GitHub or use [NuGet](https://www.nuget.org/) to download and install the SDK:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"PM> Install-Package Aylien.TextApi\",\n      \"language\": \"shell\"\n    }\n  ]\n}\n[/block]\nYou can then initiate the SDK easily:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"using Aylien.TextApi;\\nusing System;\\n\\nnamespace ConsoleApplication\\n{\\n  class Program\\n  {\\n    static void Main(string[] args)\\n    {\\n      Client client = new Client(\\\"[[app:id]]\\\", \\\"[[app:key]]\\\");\\n    }\\n  }\\n}\",\n      \"language\": \"csharp\"\n    }\n  ]\n}\n[/block]\nThe `client` object is now instantiated and contains various methods for calling different API endpoints. For instance to use Sentiment Analysis you can write the following code:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"Sentiment sentiment = client.Sentiment(text: \\\"John is a very good football player!\\\");\\n\\nConsole.WriteLine(\\\"Sentiment: {0} ({1})\\\", sentiment.Polarity, sentiment.PolarityConfidence);\",\n      \"language\": \"csharp\"\n    }\n  ]\n}\n[/block]\nYou can find examples for utilizing other endpoints in **C#** in the Endpoints section of this documentation.","excerpt":"Easiest way to get up & running with Text Analysis API in C#","slug":"csharp-sdk","type":"basic","title":"C# SDK"}

C# SDK

Easiest way to get up & running with Text Analysis API in C#

Clone the [C# SDK](https://github.com/AYLIEN/aylien_textapi_csharp) from our GitHub or use [NuGet](https://www.nuget.org/) to download and install the SDK: [block:code] { "codes": [ { "code": "PM> Install-Package Aylien.TextApi", "language": "shell" } ] } [/block] You can then initiate the SDK easily: [block:code] { "codes": [ { "code": "using Aylien.TextApi;\nusing System;\n\nnamespace ConsoleApplication\n{\n class Program\n {\n static void Main(string[] args)\n {\n Client client = new Client(\"[[app:id]]\", \"[[app:key]]\");\n }\n }\n}", "language": "csharp" } ] } [/block] The `client` object is now instantiated and contains various methods for calling different API endpoints. For instance to use Sentiment Analysis you can write the following code: [block:code] { "codes": [ { "code": "Sentiment sentiment = client.Sentiment(text: \"John is a very good football player!\");\n\nConsole.WriteLine(\"Sentiment: {0} ({1})\", sentiment.Polarity, sentiment.PolarityConfidence);", "language": "csharp" } ] } [/block] You can find examples for utilizing other endpoints in **C#** in the Endpoints section of this documentation.