Skip to content

Commit cd13cb7

Browse files
authored
Merge pull request #114 from ThriveCommunityChurch/dev
Extends API with events and transcripts
2 parents 2a2c001 + 7a510fe commit cd13cb7

30 files changed

Lines changed: 3583 additions & 48 deletions
Lines changed: 156 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,156 @@
1+
using System;
2+
using System.Collections.Generic;
3+
4+
namespace ThriveChurchOfficialAPI.Core
5+
{
6+
/// <summary>
7+
/// Represents a church event
8+
/// </summary>
9+
public class Event : ObjectBase
10+
{
11+
/// <summary>
12+
/// C'tor
13+
/// </summary>
14+
public Event()
15+
{
16+
Title = null;
17+
Summary = null;
18+
Description = null;
19+
ImageUrl = null;
20+
ThumbnailUrl = null;
21+
IconName = null;
22+
EndTime = null;
23+
IsAllDay = false;
24+
IsRecurring = false;
25+
Recurrence = null;
26+
IsOnline = false;
27+
OnlineLink = null;
28+
OnlinePlatform = null;
29+
Location = null;
30+
ContactEmail = null;
31+
ContactPhone = null;
32+
RegistrationUrl = null;
33+
Tags = new List<string>();
34+
IsActive = true;
35+
IsFeatured = false;
36+
LastUpdated = DateTime.UtcNow;
37+
CreatedBy = null;
38+
}
39+
40+
/// <summary>
41+
/// The title of the event
42+
/// </summary>
43+
public string Title { get; set; }
44+
45+
/// <summary>
46+
/// A brief summary of the event for preview displays
47+
/// </summary>
48+
public string Summary { get; set; }
49+
50+
/// <summary>
51+
/// The full description of the event (supports markdown)
52+
/// </summary>
53+
public string Description { get; set; }
54+
55+
/// <summary>
56+
/// The direct URL to the full resolution image for this event (S3 URL)
57+
/// </summary>
58+
public string ImageUrl { get; set; }
59+
60+
/// <summary>
61+
/// The direct URL to the thumbnail image for this event
62+
/// </summary>
63+
public string ThumbnailUrl { get; set; }
64+
65+
/// <summary>
66+
/// The FontAwesome icon name for this event
67+
/// </summary>
68+
public string IconName { get; set; }
69+
70+
/// <summary>
71+
/// The start date and time of the event (UTC)
72+
/// </summary>
73+
public DateTime StartTime { get; set; }
74+
75+
/// <summary>
76+
/// The end date and time of the event (UTC, optional)
77+
/// </summary>
78+
public DateTime? EndTime { get; set; }
79+
80+
/// <summary>
81+
/// Indicates if this is an all-day event
82+
/// </summary>
83+
public bool IsAllDay { get; set; }
84+
85+
/// <summary>
86+
/// Indicates if this event recurs
87+
/// </summary>
88+
public bool IsRecurring { get; set; }
89+
90+
/// <summary>
91+
/// The recurrence settings for this event
92+
/// </summary>
93+
public EventRecurrence Recurrence { get; set; }
94+
95+
/// <summary>
96+
/// Indicates if this is an online event
97+
/// </summary>
98+
public bool IsOnline { get; set; }
99+
100+
/// <summary>
101+
/// The link to the online event (e.g., Zoom link)
102+
/// </summary>
103+
public string OnlineLink { get; set; }
104+
105+
/// <summary>
106+
/// The platform for the online event (e.g., 'Zoom', 'YouTube Live')
107+
/// </summary>
108+
public string OnlinePlatform { get; set; }
109+
110+
/// <summary>
111+
/// The physical location of the event
112+
/// </summary>
113+
public EventLocation Location { get; set; }
114+
115+
/// <summary>
116+
/// The contact email for event inquiries
117+
/// </summary>
118+
public string ContactEmail { get; set; }
119+
120+
/// <summary>
121+
/// The contact phone number for event inquiries
122+
/// </summary>
123+
public string ContactPhone { get; set; }
124+
125+
/// <summary>
126+
/// The URL for event registration
127+
/// </summary>
128+
public string RegistrationUrl { get; set; }
129+
130+
/// <summary>
131+
/// Tags/categories for the event
132+
/// </summary>
133+
public List<string> Tags { get; set; }
134+
135+
/// <summary>
136+
/// Indicates if the event is active (soft delete support)
137+
/// </summary>
138+
public bool IsActive { get; set; }
139+
140+
/// <summary>
141+
/// Indicates if the event is featured
142+
/// </summary>
143+
public bool IsFeatured { get; set; }
144+
145+
/// <summary>
146+
/// Timestamp for when this event was last updated (UTC)
147+
/// </summary>
148+
public DateTime LastUpdated { get; set; }
149+
150+
/// <summary>
151+
/// The user who created this event
152+
/// </summary>
153+
public string CreatedBy { get; set; }
154+
}
155+
}
156+
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
namespace ThriveChurchOfficialAPI.Core
2+
{
3+
/// <summary>
4+
/// Represents a physical location for an event
5+
/// </summary>
6+
public class EventLocation
7+
{
8+
/// <summary>
9+
/// C'tor
10+
/// </summary>
11+
public EventLocation()
12+
{
13+
Name = null;
14+
Address = null;
15+
City = null;
16+
State = null;
17+
ZipCode = null;
18+
Latitude = null;
19+
Longitude = null;
20+
}
21+
22+
/// <summary>
23+
/// The name of the location (e.g., 'Main Sanctuary', 'Fellowship Hall')
24+
/// </summary>
25+
public string Name { get; set; }
26+
27+
/// <summary>
28+
/// The street address of the location
29+
/// </summary>
30+
public string Address { get; set; }
31+
32+
/// <summary>
33+
/// The city where the location is situated
34+
/// </summary>
35+
public string City { get; set; }
36+
37+
/// <summary>
38+
/// The state/province where the location is situated
39+
/// </summary>
40+
public string State { get; set; }
41+
42+
/// <summary>
43+
/// The postal/zip code of the location
44+
/// </summary>
45+
public string ZipCode { get; set; }
46+
47+
/// <summary>
48+
/// The latitude coordinate for map display (optional)
49+
/// </summary>
50+
public double? Latitude { get; set; }
51+
52+
/// <summary>
53+
/// The longitude coordinate for map display (optional)
54+
/// </summary>
55+
public double? Longitude { get; set; }
56+
}
57+
}
58+
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
using System;
2+
3+
namespace ThriveChurchOfficialAPI.Core
4+
{
5+
/// <summary>
6+
/// Defines recurrence settings for recurring events
7+
/// </summary>
8+
public class EventRecurrence
9+
{
10+
/// <summary>
11+
/// C'tor
12+
/// </summary>
13+
public EventRecurrence()
14+
{
15+
Pattern = RecurrencePattern.None;
16+
DayOfWeek = null;
17+
DayOfMonth = null;
18+
MonthOfYear = null;
19+
Interval = 1;
20+
EndDate = null;
21+
}
22+
23+
/// <summary>
24+
/// The recurrence pattern (Daily, Weekly, Monthly, etc.)
25+
/// </summary>
26+
public RecurrencePattern Pattern { get; set; }
27+
28+
/// <summary>
29+
/// The day of the week for weekly recurrence (0 = Sunday, 6 = Saturday)
30+
/// </summary>
31+
public int? DayOfWeek { get; set; }
32+
33+
/// <summary>
34+
/// The day of the month for monthly recurrence (1-31)
35+
/// </summary>
36+
public int? DayOfMonth { get; set; }
37+
38+
/// <summary>
39+
/// The month of the year for yearly recurrence (1-12)
40+
/// </summary>
41+
public int? MonthOfYear { get; set; }
42+
43+
/// <summary>
44+
/// The interval between recurrences (e.g., every 2 weeks)
45+
/// </summary>
46+
public int Interval { get; set; }
47+
48+
/// <summary>
49+
/// The date when the recurrence ends (optional)
50+
/// </summary>
51+
public DateTime? EndDate { get; set; }
52+
}
53+
}
54+
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
namespace ThriveChurchOfficialAPI.Core
2+
{
3+
/// <summary>
4+
/// Defines the recurrence pattern for recurring events
5+
/// </summary>
6+
public enum RecurrencePattern
7+
{
8+
/// <summary>
9+
/// Event does not recur
10+
/// </summary>
11+
None = 0,
12+
13+
/// <summary>
14+
/// Event recurs daily
15+
/// </summary>
16+
Daily = 1,
17+
18+
/// <summary>
19+
/// Event recurs weekly on a specific day
20+
/// </summary>
21+
Weekly = 2,
22+
23+
/// <summary>
24+
/// Event recurs every two weeks
25+
/// </summary>
26+
BiWeekly = 3,
27+
28+
/// <summary>
29+
/// Event recurs monthly on a specific day
30+
/// </summary>
31+
Monthly = 4,
32+
33+
/// <summary>
34+
/// Event recurs yearly on a specific date
35+
/// </summary>
36+
Yearly = 5
37+
}
38+
}
39+

0 commit comments

Comments
 (0)