Skip to content

Commit 6706da2

Browse files
authored
Merge pull request #6 from CodeBeamOrg/dev
Calendar Api Fundamentals
2 parents 7faf566 + 190a56f commit 6706da2

9 files changed

Lines changed: 683 additions & 71 deletions

File tree

377 Bytes
Binary file not shown.
143 Bytes
Binary file not shown.

.vs/GoogleApis.Blazor/v17/.suo

16 KB
Binary file not shown.

GoogleApis.Blazor/AllEnums.cs

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
using System.ComponentModel;
2-
2+
#pragma warning disable CS1591
33
namespace GoogleApis.Blazor
44
{
55
public static class EnumExtensions
@@ -60,4 +60,24 @@ public enum CredentialValueType
6060
ExpiresIn,
6161
}
6262

63+
public enum CalendarValueType
64+
{
65+
[Description("summary")]
66+
Summary,
67+
[Description("description")]
68+
Description,
69+
[Description("location")]
70+
Location,
71+
}
72+
73+
public enum EventValueType
74+
{
75+
[Description("summary")]
76+
Summary,
77+
[Description("description")]
78+
Description,
79+
[Description("location")]
80+
Location,
81+
}
82+
6383
}

GoogleApis.Blazor/Calendar/CalendarService.cs

Lines changed: 509 additions & 38 deletions
Large diffs are not rendered by default.

GoogleApis.Blazor/GoogleApis.Blazor.csproj

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,30 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
44
<TargetFramework>net6.0</TargetFramework>
55
<ImplicitUsings>enable</ImplicitUsings>
66
<Nullable>disable</Nullable>
7+
<Version>0.0.1</Version>
8+
<PackageIcon>CodeBeam-01.jpg</PackageIcon>
9+
<Copyright>Copyright 2022 CodeBeam</Copyright>
10+
<Description>A utility package for Google Apis in Blazor.</Description>
11+
<RepositoryUrl>https://github.com/CodeBeamOrg/CodeBeam.GoogleApis.Blazor</RepositoryUrl>
12+
<PackageProjectUrl>https://github.com/CodeBeamOrg/CodeBeam.GoogleApis.Blazor</PackageProjectUrl>
13+
<PackageTags>blazor;google;api;auth;calendar</PackageTags>
14+
<Company>CodeBeam</Company>
15+
<Authors>CodeBeam</Authors>
16+
<PackageId>CodeBeam.GoogleApis.Blazor</PackageId>
17+
<Product>CodeBeam.GoogleApis.Blazor</Product>
18+
<GenerateDocumentationFile>True</GenerateDocumentationFile>
719
</PropertyGroup>
820

21+
<ItemGroup>
22+
<None Include="..\..\..\..\Desktop\CodeBeam-01.jpg">
23+
<Pack>True</Pack>
24+
<PackagePath>\</PackagePath>
25+
</None>
26+
</ItemGroup>
27+
928
<ItemGroup>
1029
<PackageReference Include="Microsoft.AspNetCore.Components" Version="6.0.4" />
1130
<PackageReference Include="Microsoft.Extensions.Http" Version="6.0.0" />
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Text;
5+
using System.Threading.Tasks;
6+
7+
namespace GoogleApis.Blazor.Models
8+
#pragma warning disable CS1591
9+
{
10+
public class Creator
11+
{
12+
public string id { get; set; }
13+
public string email { get; set; }
14+
public string displayName { get; set; }
15+
public bool self { get; set; }
16+
}
17+
18+
public class Start
19+
{
20+
public string dateTime { get; set; }
21+
public string timeZone { get; set; }
22+
}
23+
24+
public class End
25+
{
26+
public string dateTime { get; set; }
27+
public string timeZone { get; set; }
28+
}
29+
30+
public class Organizer
31+
{
32+
public string id { get; set; }
33+
public string email { get; set; }
34+
public string displayName { get; set; }
35+
public bool self { get; set; }
36+
}
37+
38+
public class Reminders
39+
{
40+
public bool useDefault { get; set; }
41+
}
42+
43+
public class ConferenceProperties
44+
{
45+
public List<string> allowedConferenceSolutionTypes { get; set; }
46+
}
47+
48+
public class DefaultReminder
49+
{
50+
public string method { get; set; }
51+
public int minutes { get; set; }
52+
}
53+
54+
55+
56+
public class Notification
57+
{
58+
public string type { get; set; }
59+
public string method { get; set; }
60+
}
61+
62+
public class NotificationSettings
63+
{
64+
public List<Notification> notifications { get; set; }
65+
}
66+
67+
68+
}
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
namespace GoogleApis.Blazor.Models
2+
#pragma warning disable CS1591
3+
{
4+
/// <summary>
5+
/// A root class represents google calendar event api results.
6+
/// </summary>
7+
public class GoogleCalendarEventRoot
8+
{
9+
public string kind { get; set; } = "calendar#events";
10+
public string etag { get; set; }
11+
public string summary { get; set; }
12+
public string description { get; set; }
13+
public string updated { get; set; }
14+
public string timeZone { get; set; }
15+
public string accessRole { get; set; }
16+
public List<DefaultReminder> defaultReminders { get; set; }
17+
public string nextPageToken { get; set; }
18+
public string nextSyncToken { get; set; }
19+
public List<GoogleCalendarEventModel> items { get; set; }
20+
}
21+
22+
public class GoogleCalendarEventModel
23+
{
24+
public string kind { get; set; } = "calendar#event";
25+
public string etag { get; set; } = "";
26+
public string id { get; set; } = "";
27+
public string status { get; set; } = "confirmed";
28+
public string htmlLink { get; set; } = "";
29+
//public DateTime created { get; set; }
30+
//public DateTime updated { get; set; }
31+
public string summary { get; set; }
32+
public string description { get; set; }
33+
public string location { get; set; }
34+
//public string colorId { get; set; }
35+
public Creator creator { get; set; } = new();
36+
public Organizer organizer { get; set; } = new();
37+
public Start start { get; set; } = new();
38+
public End end { get; set; } = new();
39+
public bool endTimeUnspecified { get; set; }
40+
public string transparency { get; set; } = "opaque";
41+
public string visibility { get; set; } = "default";
42+
public string iCalUID { get; set; } = "";
43+
public int sequence { get; set; }
44+
public Reminders reminders { get; set; } = new();
45+
public string eventType { get; set; } = "default";
46+
}
47+
}
Lines changed: 18 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,39 @@
11
namespace GoogleApis.Blazor.Models
2+
#pragma warning disable CS1591
23
{
3-
public class ConferenceProperties
4+
/// <summary>
5+
/// A root class represents google calendar list api results.
6+
/// </summary>
7+
public class GoogleCalendarListRoot
48
{
5-
public List<string> allowedConferenceSolutionTypes { get; set; }
6-
}
7-
8-
public class DefaultReminder
9-
{
10-
public string method { get; set; }
11-
public int minutes { get; set; }
9+
public string kind { get; set; } = "calendar#calendarList";
10+
public string etag { get; set; }
11+
public string nextPageToken { get; set; }
12+
public string nextSyncToken { get; set; }
13+
public List<GoogleCalendarListModel> items { get; set; }
1214
}
1315

14-
public class GoogleCalendarModel
16+
public class GoogleCalendarListModel
1517
{
16-
// should be location parameter?
17-
public string kind { get; set; }
18+
public string kind { get; set; } = "calendar#calendarListEntry";
1819
public string etag { get; set; }
1920
public string id { get; set; }
2021
public string summary { get; set; }
22+
public string summaryOverride { get; set; }
2123
public string description { get; set; }
24+
public string location { get; set; }
2225
public string timeZone { get; set; }
23-
public string colorId { get; set; }
26+
//public string colorId { get; set; }
2427
public string backgroundColor { get; set; }
2528
public string foregroundColor { get; set; }
29+
public bool hidden { get; set; }
2630
public bool selected { get; set; }
2731
public string accessRole { get; set; }
2832
public List<DefaultReminder> defaultReminders { get; set; }
2933
public ConferenceProperties conferenceProperties { get; set; }
3034
public NotificationSettings notificationSettings { get; set; }
3135
public bool? primary { get; set; }
36+
public bool deleted { get; set; }
3237
}
33-
34-
public class Notification
35-
{
36-
public string type { get; set; }
37-
public string method { get; set; }
38-
}
39-
40-
public class NotificationSettings
41-
{
42-
public List<Notification> notifications { get; set; }
43-
}
44-
45-
public class GoogleCalendarRoot
46-
{
47-
public string kind { get; set; }
48-
public string etag { get; set; }
49-
public string nextSyncToken { get; set; }
50-
public List<GoogleCalendarModel> items { get; set; }
51-
}
38+
5239
}

0 commit comments

Comments
 (0)