jhoerr / box-csharp-sdk-v2

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

Unable to add multi line descriptions. #19

Closed mascon closed 11 years ago

mascon commented 11 years ago

When adding descriptions to folders I can not add multi line descriptions.

Calling the following boxClient.UpdateFolderDescription(folder.ID, "This is my description%0AThis is my secondline")

In API V1 I was able to pass the following on the URL

description=This is line one%0AThis is line two%0AThis is line three.

Now if I pass the %0A it just gets added into the description when using the SDK

How should I now add multi-line descriptions?

jhoerr commented 11 years ago

I don't know -- I've never tried. Perhaps you can create a multi-line description at Box's site, fetch it via the SDK, and see how it's encoded in JSON?

On Fri, Jan 25, 2013 at 10:42 AM, mascon notifications@github.com wrote:

When adding descriptions to folders I can not add multi line descriptions.

Calling the following boxClient.UpdateFolderDescription(folder.ID, "This is my description%0AThis is my secondline")

In API V1 I was able to pass the following on the URL

description=This is line one%0AThis is line two%0AThis is line three.

Now if I pass the %0A it just gets added into the description when using the SDK

How should I now add multi-line descriptions?

— Reply to this email directly or view it on GitHubhttps://github.com/jhoerr/box-csharp-sdk-v2/issues/19.

John Hoerr jhoerr@gmail.com 503.360.6581

mascon commented 11 years ago

Well the result is a \n

however adding that in the string when using the SDK just puts it in the single line again?

Trying with POSTMAN directly returns the correct results.

Any chance you can look at this to see if it is a quick fix?

jhoerr commented 11 years ago

When I set the description to "new\ndescription" it appears to work as expected. I verified that it creates a multi-line description at Box's site.