Get help/configuration

Mar 20, 2015 at 2:43 PM
Is there a method in TweetInvi for getting the help/configuration API endpoint?
I was looking in the Help class, but could only see GetTwitterPrivacyPolicy()

If not, how is the best way to get this data (since I also cannot see a corresponding DTO)?

Mar 20, 2015 at 3:14 PM
Edited Mar 20, 2015 at 3:21 PM

Yes it is not implemented because no one requested it until now. But as you just did, I added the Work Item to be available in the next release (

Work Item

In the meantime here is what you need to do.

1 - Reference Newtonsoft.Json in your project (use nuget, Install-Package Newtonsoft.Json).
2 - Create the following model representing the json of the configuration endpoint:
public class TwitterConfiguration
    public int CharactersReservedPerMedia { get; private set; }

    public int MaxMediaPerUpload { get; private set; }

    public string[] NonUsernamePaths { get; private set; }

    public int PhotoSizeLimit { get; private set; }

    public Dictionary<string, MediaEntitySize> PhotoSizes { get; private set; }

    public int ShortURLLength { get; private set; }

    public int ShortURLLengthHttps { get; private set; }
3 - Invoke the endpoint:
var configuration = TwitterAccessor.ExecuteGETQuery<TwitterConfiguration>("");
And here you go ;)
Marked as answer by linvi on 3/20/2015 at 8:33 AM
Mar 20, 2015 at 3:48 PM
Thank you very much for your quick response!