We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
开发者_JS百科Closed 4 years ago.
Improve this questionI am looking for a .NET (c#) wrapper for the 37signals Highrise REST API. Sadly enough, I could not find anything really suitable. Has anyone developed something like this or has links to share?
Use RestSharp - http://restsharp.org/
As some have suggested, RestSharp is pretty easy to use with the HighRise API. At least one person suggested using xsd.exe
which I strongly suggest against -- this will complicate things too much. Instead, create a POCO type with just the items you want to get/set. Like this:
namespace Highrise.Model
{
public class Person
{
[XmlElement("author-id")]
public string AuthorId
{
get;
set;
}
[XmlElement("background")]
public string Background
{
get;
set;
}
[XmlElement("first-name")]
public string FirstName
{
get;
set;
}
[XmlElement("last-name")]
public string LastName
{
get;
set;
}
[XmlElement("id")]
public string Id
{
get;
set;
}
}
public class People : List<Person>{}
}
Then, just do a get using the RestSharp library like this:
// Setup our client:
var client = new RestClient("https://yourhighrisename.highrisehq.com");
client.Authenticator = new HttpBasicAuthenticator("YOUR_API_KEY_HERE", "X");
// Create our request:
var request = new RestRequest("/people.xml", Method.GET);
// Execute our request with our client:
RestResponse<People> response = (RestResponse<People>) client.Execute<People>(request);
I know I'm resurrecting an old question, but in the event this helps someone who gets here from Google (I found this thread myself when looking for the same thing), I've created a new Github repository for a .NET Highrise API wrapper.
Just to clarify, while you may find some Highrise-specific REST API wrapper libraries out there, you are likely to have just as easy a time using a general purpose REST API wrapper (such as RestSharp noted above).
I propose another project, which I am currently using to access Highrise via the REST API.
The library is called Hammock, and is found here on github: https://github.com/danielcrenna/hammock
I think you should try this:
http://sdk.welovehighrise.com/
It works perfectly in our applications
精彩评论