source: extensions/PiwigoLib/PiwigoLib/Proxy/Response/PwgImagesProxyResponse.cs @ 12336

Last change on this file since 12336 was 12336, checked in by bayral, 12 years ago

rename category to Albums

File size: 5.8 KB
Line 
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Text;
5using System.Xml.Serialization;
6using Com.Piwigo.Lib.DTO;
7
8namespace Com.Piwigo.Lib.Proxy.Response
9{
10    [Serializable()]
11    [XmlRoot(ElementName = "rsp")]
12    public class PwgAddSimpleImageProxyResponse : PwgBaseProxyReponse
13    {
14        [XmlElement("image_id")]
15        public Int32 Id { get; set; }
16        [XmlElement("url")]
17        public String UrlImage { get; set; }
18    }
19
20    [Serializable()]
21    [XmlRoot(ElementName = "rsp")]
22    public class PwgImageRateProxyResponse : PwgBaseProxyReponse
23    {
24        [XmlElement("count")]
25        public Int32 Count { get; set; }
26        [XmlElement("average")]
27        public String Average { get; set; }
28        [XmlElement("stdev")]
29        public String Stdev { get; set; }
30    }
31     
32
33    [Serializable()]
34    [XmlRoot(ElementName = "category")]
35    public class PwgImageProxyResponse 
36    {
37        [XmlAttribute(AttributeName = "id")]
38        public Int32 Id { get; set; }
39        [XmlAttribute(AttributeName = "width")]
40        public Int32 Width { get; set; }
41        [XmlAttribute(AttributeName = "height")]
42        public Int32 Height { get; set; }
43        [XmlAttribute(AttributeName = "file")]
44        public String File { get; set; }
45        [XmlAttribute(AttributeName = "tn_url")]
46        public String UrlThunb { get; set; }
47        [XmlAttribute(AttributeName = "element_url")]
48        public String UrlElement { get; set; }
49        [XmlAttribute(AttributeName = "high_url")]
50        public String UrlHighDef { get; set; }
51        [XmlAttribute(AttributeName = "hit")]
52        public Int64 Counter { get; set; }
53        [XmlAttribute(AttributeName = "date_creation")]
54        public String CreatingDate { get; set; }
55        [XmlAttribute(AttributeName = "date_available")]
56        public String AvailableDate { get; set; }
57
58        [XmlArray("tags")]
59        [XmlArrayItem("tag")]
60        public PwgTagProxyResponse[] Tags { get; set; }
61
62        [XmlArray("categories")]
63        [XmlArrayItem("category")]
64        public PwgAlbumProxyResponse[] Albums { get; set; }
65    }
66
67    [Serializable()]
68    [XmlRoot(ElementName = "rsp")]
69    public class PwgImageInfoProxyResponse : PwgBaseProxyReponse
70    {
71        [XmlElement("image")]
72        public PwgImageInfoImageProxyResponse ImageInfo { get; set; }
73    }
74
75    [Serializable()]
76    [XmlRoot(ElementName = "image")]
77    public class PwgImageInfoImageProxyResponse : PwgImageProxyResponse
78    {
79        public String ExtThumbail { get; set; }
80        [XmlAttribute(AttributeName = "author")]
81        public String Author { get; set; }
82        [XmlAttribute(AttributeName = "filesize")]
83        public Int64 ImageFileSize { get; set; }
84        [XmlAttribute(AttributeName = "date_metadata_update")]
85        public String DateUpdateMetaData { get; set; }
86        [XmlAttribute(AttributeName = "has_high")]
87        public Boolean hasHighDef { get; set; }
88        [XmlAttribute(AttributeName = "high_filesize")]
89        public Int64 HighDefFileSize { get; set; }
90        [XmlAttribute(AttributeName = "level")]
91        public Int32 ConfidentialLevel { get; set; }
92        [XmlAttribute(AttributeName = "md5sum")]
93        public String md5Sum { get; set; }
94        [XmlAttribute(AttributeName = "added_by")]
95        public Int32 UserIdAddedBy { get; set; }
96
97        [XmlElement("name")]
98        public String Name { get; set; }
99
100        [XmlElement("rates")]
101        public PwgImageRateProxyResponse ImageRate { get; set; }
102       
103        [XmlElement("comments")]
104        public PwgCommentPageProxyResponse ImageComments { get; set; }
105
106        [XmlElement("comment_post")]
107        public PwgPostCommentSecurityInfo PostCommentSecurityData { get; set; }
108    }
109
110    [Serializable()]
111    [XmlRoot(ElementName = "comment_post")]
112    public class PwgPostCommentSecurityInfoProxyResponse
113    {
114        [XmlAttribute(AttributeName = "author")]
115        public String Author { get; set; }
116        [XmlAttribute(AttributeName = "key")]
117        public String AllowPostKey { get; set; }
118    }
119
120    [Serializable()]
121    [XmlRoot(ElementName = "comments")]
122    public class PwgCommentPageProxyResponse
123    {
124        [XmlAttribute("page")]
125        public Int32 Page { get; set; }
126        [XmlAttribute("per_page")]
127        public Int32 PerPage { get; set; }
128        [XmlAttribute("count")]
129        public Int32 CountOf { get; set; }
130        [XmlAttribute("nb_comments")]
131        public Int32 TotalCommentNumber { get; set; }
132
133        [XmlElement("comment", typeof(PwgCommentProxyResponse))]
134        public PwgCommentProxyResponse[] Comments { get; set; }
135    }
136
137    [Serializable()]
138    [XmlRoot(ElementName = "comments")]
139    public class PwgCommentProxyResponse
140    {
141        [XmlAttribute("id")]
142        public Int32 Id { get; set; }
143        [XmlAttribute("date")]
144        public DateTime CommentDate { get; set; }
145        [XmlAttribute("author")]
146        public String Author { get; set; }
147        [XmlAttribute("content")]
148        public String Content { get; set; }
149    }
150
151    [Serializable()]
152    [XmlRoot(ElementName = "images")]
153    public class PwgImageListProxyResponse
154    {
155        [XmlAttribute("page")]
156        public Int32 Page { get; set; }
157        [XmlAttribute("per_page")]
158        public Int32 PerPage { get; set; }
159        [XmlAttribute("count")]
160        public Int32 Count { get; set; }
161
162        [XmlElement("image", typeof(PwgImageProxyResponse))]
163        public PwgImageProxyResponse[] Images { get; set; }
164
165
166    }
167
168    [Serializable()]
169    [XmlRoot(ElementName = "rsp")]
170    public class PwgImagesProxyResponse : PwgBaseProxyReponse
171    {
172        [XmlElement("images")]
173        public PwgImageListProxyResponse ImageList { get; set; }
174    }
175
176}
Note: See TracBrowser for help on using the repository browser.