MeltwaterArchive / datasift-dotnet

The official .NET API library for DataSift.
MIT License
12 stars 6 forks source link

Definition.getBuffered with only a hash #12

Open samjudson opened 11 years ago

samjudson commented 11 years ago

Hi

I'm trying to run a definition using only a hash, but to get this to work I had to change the getBuffered to check for m_hash.Length == 0 as well:

if (m_csdl.Length == 0 && m_hash.Length == 0)
{
    throw new InvalidDataException("...");
}

Does this sound right, or should I be calling something else first?

My calling code looks like this:

var u = new User(Username, ApiKey);
var def = new Definition(u, "", hash);
return def.getBuffered(5);