You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+36-4Lines changed: 36 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,8 +19,22 @@ Welcome to all contributors!
19
19
20
20
## Usage
21
21
### Preliminary: Set your google account and your project credentials
22
-
Nothing special with this package.
23
-
### Step 1: Inject HttpClientFactory
22
+
Set your google client. This process has no special thing with this library. [Read the details.](https://developers.google.com/identity/gsi/web/guides/get-google-api-clientid)
23
+
<br /> Add the credential into appsettings.json file like the below example. (Not obligatory, but ClientId, ClientSecret and RedirectUrl is required for some features to use this library simpler.)
## How To Get and Process Lists (Like Calendar and Event)
129
+
When you call the api to return a list of items (like calendars or events) it returns a root class. These classes can be find in the library. You can use the "items" property to reach list of items.
130
+
<br />
131
+
<br />
132
+
#### The Models
133
+
- GoogleCalendarListRoot -> The root calendar model which is a proper for `GetCalendars()` method result
134
+
- GoogleCalendarListModel -> The calendar model. GoogleCalendarListRoot.items has a `List<GoogleCalendarListModel>`
135
+
- GoogleCalendarEventRoot -> The root event model which is a proper for `GetEvents()` method result
136
+
- GoogleCalendarEventModel -> The event model. GoogleCalendarEventRoot.items has a `List<GoogleCalendarEventModel>`
137
+
138
+
#### Usage
139
+
```cs
140
+
varresult=CalendarService.GetCalendars();
141
+
GoogleCalendarListRoot_calendars=JsonSerializer.Deserialize<GoogleCalendarListRoot>(result); // _calendars.items has the list of calendars.
0 commit comments