2
// Mono.Facebook.Event.cs:
4
// George Talusan (george@convolve.ca)
7
// Permission is hereby granted, free of charge, to any person obtaining
8
// a copy of this software and associated documentation files (the
9
// "Software"), to deal in the Software without restriction, including
10
// without limitation the rights to use, copy, modify, merge, publish,
11
// distribute, sublicense, and/or sell copies of the Software, and to
12
// permit persons to whom the Software is furnished to do so, subject to
13
// the following conditions:
15
// The above copyright notice and this permission notice shall be
16
// included in all copies or substantial portions of the Software.
18
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
19
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
20
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
21
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
22
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
23
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
24
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27
using System.Collections.Generic;
29
using System.Xml.Serialization;
32
namespace Mono.Facebook
34
public class EventMemberList
36
public Friend[] Attending;
38
public Friend[] Unsure;
40
public Friend[] Declined;
42
public Friend[] NotReplied;
45
public class Event : SessionWrapper
53
[XmlElement ("tagline")]
54
public string Tagline;
65
get { return new Uri (Pic); }
68
[XmlElement ("pic_big")]
74
get { return new Uri (PicBig); }
77
[XmlElement ("pic_small")]
78
public string PicSmall;
81
public Uri PicSmallUri
83
get { return new Uri (PicSmall); }
89
[XmlElement ("description")]
90
public string Description;
92
[XmlElement ("event_type")]
93
public string EventType;
95
[XmlElement ("event_subtype")]
96
public string EventSubType;
98
[XmlElement ("start_time")]
99
public long StartTime;
101
[XmlElement ("end_time")]
104
[XmlElement ("creator")]
105
public long? Creator;
107
[XmlElement ("update_time")]
108
public long UpdateTime;
110
[XmlElement ("location")]
111
public string Location;
113
[XmlElement ("venue")]
114
public Location Venue;
117
public EventMemberList MemberList {
119
EventMembersResponse rsp = Session.Util.GetResponse<EventMembersResponse> ("facebook.events.getMembers",
120
FacebookParam.Create ("session_key", Session.SessionKey),
121
FacebookParam.Create ("call_id", DateTime.Now.Ticks),
122
FacebookParam.Create ("eid", EId));
124
EventMemberList list = new EventMemberList ();
126
list.Attending = new Friend [rsp.Attending.UIds.Length];
127
for (int i = 0; i < list.Attending.Length; i++)
128
list.Attending[i] = new Friend (rsp.Attending.UIds [i], this.Session);
130
list.Unsure = new Friend [rsp.Unsure.UIds.Length];
131
for (int i = 0; i < list.Unsure.Length; i++)
132
list.Unsure [i] = new Friend (rsp.Unsure.UIds [i], this.Session);
134
list.Declined = new Friend [rsp.Declined.UIds.Length];
135
for (int i = 0; i < list.Declined.Length; i ++)
136
list.Declined [i] = new Friend (rsp.Declined.UIds [i], this.Session);
138
list.NotReplied = new Friend [rsp.NotReplied.UIds.Length];