Line | |
---|
1 | using System; |
---|
2 | using System.Collections.Generic; |
---|
3 | using System.Text; |
---|
4 | |
---|
5 | using Com.Piwigo.Lib.DTO; |
---|
6 | using System.Web; |
---|
7 | using Com.Piwigo.Lib.Proxy.Response; |
---|
8 | using Com.Piwigo.Lib.Proxy.Helper; |
---|
9 | |
---|
10 | namespace Com.Piwigo.Lib.Proxy |
---|
11 | { |
---|
12 | static class PwgImagesProxy |
---|
13 | { |
---|
14 | /// <summary> |
---|
15 | /// pwg.images.rate |
---|
16 | /// </summary> |
---|
17 | /// <param name="imageId"></param> |
---|
18 | /// <param name="imageRate"></param> |
---|
19 | /// <returns></returns> |
---|
20 | static public PwgImageRateProxyResponse pwg_images_rate(Int32 imageId, Int32 imageRate) |
---|
21 | { |
---|
22 | PwgImageRateProxyResponse response = null; |
---|
23 | try |
---|
24 | { |
---|
25 | StringBuilder data = new StringBuilder(); |
---|
26 | data.Append("method=pwg.images.rate"); |
---|
27 | Boolean firstOcc = false; |
---|
28 | PwgProxyReponseHelper.buildQueryFromValue<Int32>(imageId, "image_id", ref firstOcc, data); |
---|
29 | PwgProxyReponseHelper.buildQueryFromValue<Int32>(imageRate, "rate", ref firstOcc, data); |
---|
30 | |
---|
31 | response = PwgGenericProxy<PwgImageRateProxyResponse>.Post( |
---|
32 | PwgConfigProxy.PwgServeurUriBuilder.Uri, |
---|
33 | data.ToString()); |
---|
34 | } |
---|
35 | catch (Exception ex) |
---|
36 | { |
---|
37 | throw new PwgProxyException("pwg_images_rate", ex); |
---|
38 | } |
---|
39 | |
---|
40 | return response; |
---|
41 | } |
---|
42 | |
---|
43 | } |
---|
44 | |
---|
45 | } |
---|
46 | |
---|
Note: See
TracBrowser
for help on using the repository browser.