jhoerr / box-csharp-sdk-v2

A C# client for the Box API (v2).
http://developers.box.com/docs/
11 stars 15 forks source link

GetFolders appears to be missing this element #21

Closed mascon closed 11 years ago

mascon commented 11 years ago

When I get a list of folders I do not see in the returned values this element

sync_state

It is listed as an element in the box documentation for folders.

OK here is the call needed.

https://api.box.com/2.0/folders/0/items?fields=sync_state

This would be really helpful... god I wish I was a C# programmer

jhoerr commented 11 years ago

That's a new field. I'll get it added.

mascon commented 11 years ago

Thanks. We have been needing this for ages. Is it a big change or one I can expect in your normal 1-2 hour scheduling :-)

Sent from my BlackBerry® wireless device

-----Original Message----- From: John Hoerr notifications@github.com Date: Tue, 05 Feb 2013 13:57:26 To: jhoerr/box-csharp-sdk-v2box-csharp-sdk-v2@noreply.github.com Reply-To: jhoerr/box-csharp-sdk-v2 reply@reply.github.com Cc: masconimom@andimgone.com Subject: Re: [box-csharp-sdk-v2] GetFolders appears to be missing this element (#21)

That's a new field. I'll get it added.


Reply to this email directly or view it on GitHub: https://github.com/jhoerr/box-csharp-sdk-v2/issues/21#issuecomment-13154297

jhoerr commented 11 years ago

Folder.SyncState is now available as a string in cfc3138862171a066d641e3a216cd3372fdec96a. I will change this to an enum when I can figure out all of the possible values.

jhoerr commented 11 years ago

Oh and I should mention that Box does not appear to return sync_state unless it's explicitly requested.

prexer commented 11 years ago

That's correct. We generally didn't think most clients would care about the sync_state, and didn't want to clutter up the responses. Possible values: not_synced, partially_synced, and synced

jhoerr commented 11 years ago

Thanks Peter!

mascon commented 11 years ago

Can these an object like the status Active and inactive ? This would be nice for all predefined return types.

jhoerr commented 11 years ago

Yep. Thanks to Peter's comment I can now enumerate the range of possible values. Look for this today.

jhoerr commented 11 years ago

Enumerated values in 13975648a23dfb13864530a016b0394a834c1b77. If the sync_state is not requested, the value of Folder.SyncState will be 'SyncState.Unknown'.