|
1 | | -Calendar API Sync Samples |
2 | | -========================= |
| 1 | +# Java Samples |
3 | 2 |
|
4 | | -A set of samples that demonstrate how to utilize sync tokens and etags in the calendar API to sync |
5 | | -resources more efficiently. |
| 3 | +A collection of samples that demonstrate how to call G Suite APIs in Java. |
6 | 4 |
|
7 | | -Introduction |
8 | | ------------- |
| 5 | +## Products |
9 | 6 |
|
10 | | -To make it easier for your applications to stay in sync with your users' Google Calendar data the |
11 | | -API has added support for sync tokens. These tokens store information about the data you've already |
12 | | -retrieved, so that the next time you make a request you'll only be given the resources that have |
13 | | -been added, updated, or deleted since your last sync. These samples demonstrate how to sync |
14 | | -efficiently, utilizing sync tokens as well as resource versioning (etags). |
| 7 | +### Calendar |
15 | 8 |
|
16 | | -Prerequisites |
17 | | --------------- |
18 | | - |
19 | | -Read the following guides: |
20 | | - |
21 | | -- [Syncing Guide](https://developers.google.com/google-apps/calendar/v3/sync) |
22 | | -- [Resource Versioning Guide](https://developers.google.com/google-apps/calendar/v3/version-resources) |
23 | | - |
24 | | -Setup your Java environment: |
25 | | - |
26 | | -- Install [JDK 1.6 or higher](http://www.oracle.com/technetwork/java/javase/downloads) |
27 | | -- Install [Apache Maven](http://maven.apache.org) |
28 | | - |
29 | | -Getting Started |
30 | | ---------------- |
31 | | - |
32 | | -1. Edit `client_secrets.json` and set the client ID and secret. You can create an ID/secret pair |
33 | | - using the [Google Developers Console](https://console.developers.google.com). |
34 | | -2. Run `mvn compile` to build the project. |
35 | | -3. Run one of the three samples: |
36 | | - * Sync Token Sample: |
37 | | - `mvn exec:java -Dexec.mainClass="com.google.api.services.samples.calendar.sync.SyncTokenSample"` |
38 | | - * Conditional Modification Sample: |
39 | | - `mvn exec:java -Dexec.mainClass="com.google.api.services.samples.calendar.sync.ConditionalModificationSample"` |
40 | | - * Conditional Retrieval Sample: |
41 | | - `mvn exec:java -Dexec.mainClass="com.google.api.services.samples.calendar.sync.ConditionalRetrievalSample"` |
42 | | - |
43 | | -Support |
44 | | -------- |
45 | | - |
46 | | -- Stack Overflow Tag: [google-calendar](http://stackoverflow.com/questions/tagged/google-calendar) |
47 | | -- Issue Tracker: [apps-api-issues](https://code.google.com/a/google.com/p/apps-api-issues/issues/list) |
48 | | - |
49 | | -If you've found an error in this sample, please file an issue: |
50 | | -https://github.com/googlesamples/calendar-sync/issues |
51 | | - |
52 | | -Patches are encouraged, and may be submitted by forking this project and |
53 | | -submitting a pull request through GitHub. |
54 | | - |
55 | | -License |
56 | | -------- |
57 | | - |
58 | | -Copyright 2014 Google, Inc. |
59 | | - |
60 | | -Licensed to the Apache Software Foundation (ASF) under one |
61 | | -or more contributor license agreements. See the NOTICE file |
62 | | -distributed with this work for additional information |
63 | | -regarding copyright ownership. The ASF licenses this file |
64 | | -to you under the Apache License, Version 2.0 (the |
65 | | -"License"); you may not use this file except in compliance |
66 | | -with the License. You may obtain a copy of the License at |
67 | | - |
68 | | - http://www.apache.org/licenses/LICENSE-2.0 |
69 | | - |
70 | | -Unless required by applicable law or agreed to in writing, |
71 | | -software distributed under the License is distributed on an |
72 | | -"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
73 | | -KIND, either express or implied. See the License for the |
74 | | -specific language governing permissions and limitations |
75 | | -under the License. |
| 9 | +- [Sync Tokens and Etags](calendar/sync) |
0 commit comments