Hadi Hariri

Sponsors

The Lounge

Wicked Cool Jobs

Syndication

YouTrackSharp: A .NET Client for YouTrack

On and off I’ve been working on a .NET library that is a wrapper around YouTrack ReST API’s.  If you’re not familiar with YouTrack, it’s our Web-Based Issue Management system, which is currently at version 3 and recently we announced the availability of a free version. If you like keyboard-centric tools (like for instance ReSharper), you’ll love YouTrack.

YouTrack offers quite a lot of possibilities when it comes to interacting with it. I’ve previously blogged about how we can easily create some HTML 5 graphs using nothing but the ReST API and some jQuery. Of course, we could also take advantage of this API from .NET using merely an HTTP client.

YouTrackSharp

What YouTrackSharp brings to the table is a compact interface to work with YouTrack without worrying about things like cookies, URL’s and other HTTP concerns. It abstracts all that away to provide a simple series of classes to work with YouTrack.

Here’s a sample of a command line app I just wrote to make feature logging easier for ReSharper:

var connection = new Connection("youtrack.jetbrains.net");

connection.Authenticate("username", "password");

var issueManagement = new IssueManagement(connection);

var issue = new Issue
            {
                Assignee = "ReSharperProjectManager",
                Summary = summary,
                Description = description,
                ProjectShortName = "RSRP",
                Type = "Feature"
            };


issueManagement.CreateIssue(issue);

Console.WriteLine("Feature request logged");

Currently it allows you to Create Issues, Upload Attachments, Get Issues, Apply Commands to issues as well as a bunch of tasks on Projects. I’m adding features as and when I can, so if there’s something you’d like, log it here.

How to use it

YouTrackSharp is available as a NuGet package and source code is available on GitHub. To use it, just do:

install-package YouTrackSharp

You first need to create a Connection object (providing host) and then either a IssueManagement or ProjectManagement  based on what you need to do. The classes are simple and the methods should be self explanatory. The project also comes with tests using MSpec which describe many scenarios. If you have any questions, shout!

Ruby

If you are a Ruby developer, know that Anna Zhdan, a colleague at JetBrains, has also started working on a Ruby library for YouTrack, which is available on GitHub


Posted 06-26-2011 12:25 PM by Hadi Hariri

[Advertisement]

Comments

Dave wrote re: YouTrackSharp: A .NET Client for YouTrack
on 11-01-2011 6:45 AM

Where do I find the binaries for YouTrackSharp ?

I've installed NuGet package.

Then what ?

Thiss wrote re: YouTrackSharp: A .NET Client for YouTrack
on 11-01-2011 9:10 AM

Cancel that - I fetch and built the code. Now finding my way round - looks mighty useful :-)

Add a Comment

(required)  
(optional)
(required)  
Remember Me?

About The CodeBetter.Com Blog Network
CodeBetter.Com FAQ

Our Mission

Advertisers should contact Brendan

Subscribe
Google Reader or Homepage

del.icio.us CodeBetter.com Latest Items
Add to My Yahoo!
Subscribe with Bloglines
Subscribe in NewsGator Online
Subscribe with myFeedster
Add to My AOL
Furl CodeBetter.com Latest Items
Subscribe in Rojo

Member Projects
DimeCasts.Net - Derik Whittaker

Friends of Devlicio.us
Red-Gate Tools For SQL and .NET

NDepend

SlickEdit
 
SmartInspect .NET Logging
NGEDIT: ViEmu and Codekana
LiteAccounting.Com
DevExpress
Fixx
NHibernate Profiler
Unfuddle
Balsamiq Mockups
Scrumy
JetBrains - ReSharper
Umbraco <-- NEW Friend!
NServiceBus <-- NEW Friend!

 



Site Copyright © 2007 CodeBetter.Com
Content Copyright Individual Bloggers

 

Community Server (Commercial Edition)