How to receive images of sharepoint with api rest in Xamarin Forms?

-1

SHAREPOINT: I'm trying to get in C # images from a sharepoint list, I try to receive them in a string but it does not allow me. The list has an image title, description of it and the image.

I want to save them in the local database; the request goes like this:

SharePointSiteURL + 
"_api/web/lists/GetByTitle('OutServices')/items?$filter=Modified ge DateTime'" +
lastDate.Value.ToString("O") + "'"); 

In the model I tried to receive it like this:

[JsonProperty("Image")]
public string image { get; set; }

I try to receive it in a string, since it comes as a text string in the ODATA, if it does not come like that, how could I receive it?

The only thing I can not receive is the image.

    
asked by Joel Caballero 05.12.2017 в 16:50
source

1 answer

0

From what I see, you must add which fields you want to bring from the list OutServices

Currently has this:

"_api/web/lists/GetByTitle('OutServices')/items?$filter=Modified ge..."

But you should put it like this:

"_api/Web/Lists/GetByTitle('OutServices')/items?$select=Title,Description,FileRef&$filter=Modified ge..."

Where:

  • Title is the title / name of the image.
  • Description is the description of the image.
  • FileRef is the absolute path of the image.
answered by 05.12.2017 в 18:10