Code Monkey home page Code Monkey logo

highrise-api's People

Contributors

allen-dolph avatar kanielii avatar pietervdw avatar scottschluer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

highrise-api's Issues

Instant Messenger not uploaded to Highrise

Not sure if it is just me, but I'm it seems that Instant Messengers are not uploaded to Highrise, for example, the following code compiles and returns HTTP OK, but the Instant Messenger item is not created:

HighriseApi.ApiRequest api = new HighriseApi.ApiRequest("username", "token");

var person = api.PersonRequest.Get(171257595);

InstantMessenger im = new InstantMessenger();
im.Address = "blahblah";
im.Location = "Personal";
im.Protocol = "MSN";

person.ContactData.InstantMessengers.Add(im);

person = api.PersonRequest.Update(person);

This happens on both the Person and Company class.

Company Get (List) fails after Company Update

Environment: .NET 4.5 in VS2013
Requests captured using Fiddler
Possible (nasty?) fix: Make Company.CreatedAt a DateTime? instead of a DateTime (however see note at the end).
Issue: After updating a company using the code below, the final request to get a list of companies fails, if the updated company is in the block of companies requested

company.Tags.Add(newTag);
company.Tags.Add(oldTag);
api.CompanyRequest.Update(company);
api.CompanyRequest.Get(offset:(int?)currentBlock); // now this fails

Diagnosis:
RestSharp is actually the component throwing the exception. The company is updated with a value in the PUT of <created-at>30/05/2014 14:07:07</created-at> (for example), but is then returned in the GET xml with <created-at type="datetime" nil="true"></created-at>. The nil DateTime appears to then throw an exception within RestSharp:

Message: "String was not recognized as a valid DateTime."
Stacktrace:    at System.DateTimeParse.Parse(String s, DateTimeFormatInfo dtfi, DateTimeStyles styles)
   at System.DateTime.Parse(String s, IFormatProvider provider)
   at RestSharp.Deserializers.XmlDeserializer.Map(Object x, XElement root)
   at RestSharp.Deserializers.XmlDeserializer.CreateAndMap(Type t, XElement element)
   at RestSharp.Deserializers.XmlDeserializer.PopulateListFromElements(Type t, IEnumerable`1 elements, IList list)
   at RestSharp.Deserializers.XmlDeserializer.HandleListDerivative(Object x, XElement root, String propName, Type type)
   at RestSharp.Deserializers.XmlDeserializer.Deserialize[T](IRestResponse response)
   at RestSharp.RestClient.Deserialize[T](IRestRequest request, IRestResponse raw)

While changing Company.CreatedAt to public DateTime? CreatedAt { get; set; } allows all the companies to be returned in the block, that then creates a new issue: updating a company by api.CompanyRequest.Update(company) removes the value of CreatedAt.

When getting Recordings in .Net wrapper, you are limited to 25 records, and you don't get to specify which

In my personal implementation, I added a method override to allow the user to pass in either a page number or "-1" as the page number value to get "all" records. Then I would make a request, while tracking pages in a loop, until I received less than 25 records. Then I would return the data. Otherwise, I added the page number to the querystring object. I have the code to do this and I can submit for review if you send me a message. This is an issue on at least two data obj types.

Failing on first test...

Hi,
I am testing the API and it's failing at very first beginning... :)

        const string username = "<myaccount>";

        const string authenticationToken = "<mytoken>";

        var api = new ApiRequest(username, authenticationToken);

        var people = api.PersonRequest.Get();

        foreach (var person in people)
        {
            Console.WriteLine(person.FirstName);
            Console.WriteLine(person.Id);
            if (person.ContactData.EmailAddresses.Count != 0)
                Console.WriteLine(person.ContactData.EmailAddresses[0].Address);
        }

Error I am getting is: System.NullReferenceException occurred on object people. Do I need to set any info before using the API?

Thanks,
Ros.

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.