Skip to content

Commit 013b35b

Browse files
committed
Move calendar samples into a new folder since this repo is now for all G Suite samples, not just Calendar API Sync.
1 parent c794fd5 commit 013b35b

File tree

14 files changed

+99
-107
lines changed

14 files changed

+99
-107
lines changed

.gitignore

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Compiled class file
2+
*.class
3+
4+
# Log file
5+
*.log
6+
7+
# BlueJ files
8+
*.ctxt
9+
10+
# Mobile Tools for Java (J2ME)
11+
.mtj.tmp/
12+
13+
# Package Files #
14+
*.jar
15+
*.war
16+
*.ear
17+
*.zip
18+
*.tar.gz
19+
*.rar
20+
21+
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
22+
hs_err_pid*
23+
24+
.DS_Store

CONTRIB.md

Lines changed: 0 additions & 35 deletions
This file was deleted.

CONTRIBUTING.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Contributing: submitting patches and tutorials
2+
3+
## Submitting a pull request
4+
5+
### Contributor License Agreements
6+
7+
We'd love to accept your code patches! However, before we can take them, we
8+
have to jump a couple of legal hurdles.
9+
10+
Please fill out either the individual or corporate Contributor License
11+
Agreement.
12+
13+
* If you are an individual writing original source code and you're sure you
14+
own the intellectual property, then sign an [individual CLA](https://developers.google.com/open-source/cla/individual).
15+
* If you work for a company that wants to allow you to contribute your work,
16+
then sign a [corporate CLA](https://developers.google.com/open-source/cla/corporate).
17+
18+
Follow either of the two links above to access the appropriate CLA and
19+
instructions for how to sign and return it.
20+
21+
1. Sign the contributors license agreement above.
22+
1. Decide which code you want to submit. A submission should be a set of changes
23+
that addresses one issue in the [issue tracker](https://github.com/Google/WebFundamentals/issues).
24+
Please don't mix more than one logical change per submission, because it makes
25+
the history hard to follow. If you want to make a change
26+
(e.g. add a sample or feature) that doesn't have a corresponding issue in the
27+
issue tracker, please create one.
28+
1. **Submitting**: When you are ready to submit, send us a Pull Request. Be
29+
sure to include the issue number you've fixed and the name you used to sign
30+
the CLA.
31+

LICENSE

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
Apache License
23
Version 2.0, January 2004
34
http://www.apache.org/licenses/
@@ -186,7 +187,7 @@
186187
same "printed page" as the copyright notice for easier
187188
identification within third-party archives.
188189

189-
Copyright 2014 Google Inc.
190+
Copyright [yyyy] [name of copyright owner]
190191

191192
Licensed under the Apache License, Version 2.0 (the "License");
192193
you may not use this file except in compliance with the License.

README.md

Lines changed: 5 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -1,75 +1,9 @@
1-
Calendar API Sync Samples
2-
=========================
1+
# Java Samples
32

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.
64

7-
Introduction
8-
------------
5+
## Products
96

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
158

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)

calendar/sync/README.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Calendar API Sync Samples
2+
3+
A set of samples that demonstrate how to utilize sync tokens and etags in the calendar API to sync
4+
resources more efficiently.
5+
6+
## Introduction
7+
8+
To make it easier for your applications to stay in sync with your users' Google Calendar data the
9+
API has added support for sync tokens. These tokens store information about the data you've already
10+
retrieved, so that the next time you make a request you'll only be given the resources that have
11+
been added, updated, or deleted since your last sync. These samples demonstrate how to sync
12+
efficiently, utilizing sync tokens as well as resource versioning (etags).
13+
14+
## Prerequisites
15+
16+
Read the following guides:
17+
18+
- [Syncing Guide](https://developers.google.com/google-apps/calendar/v3/sync)
19+
- [Resource Versioning Guide](https://developers.google.com/google-apps/calendar/v3/version-resources)
20+
21+
Setup your Java environment:
22+
23+
- Install [JDK 1.6 or higher](http://www.oracle.com/technetwork/java/javase/downloads)
24+
- Install [Apache Maven](http://maven.apache.org)
25+
26+
## Getting Started
27+
28+
1. Edit `client_secrets.json` and set the client ID and secret. You can create an ID/secret pair
29+
using the [Google Developers Console](https://console.developers.google.com).
30+
1. Run `mvn compile` to build the project.
31+
1. Run one of the three samples:
32+
* Sync Token Sample:
33+
`mvn exec:java -Dexec.mainClass="com.google.api.services.samples.calendar.sync.SyncTokenSample"`
34+
* Conditional Modification Sample:
35+
`mvn exec:java -Dexec.mainClass="com.google.api.services.samples.calendar.sync.ConditionalModificationSample"`
36+
* Conditional Retrieval Sample:
37+
`mvn exec:java -Dexec.mainClass="com.google.api.services.samples.calendar.sync.ConditionalRetrievalSample"`
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)