https://github.com/n7ghtm4r3/googlemanager
This is a Java-based library useful to work with all Google's API services. Good use!
https://github.com/n7ghtm4r3/googlemanager
api api-client api-java gmail gmail-api google google-api java oauth2 oauth2-client oauth2-server tecknobit
Last synced: about 1 year ago
JSON representation
This is a Java-based library useful to work with all Google's API services. Good use!
- Host: GitHub
- URL: https://github.com/n7ghtm4r3/googlemanager
- Owner: N7ghtm4r3
- License: mit
- Created: 2022-10-10T13:44:41.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-01-29T21:46:12.000Z (over 2 years ago)
- Last Synced: 2025-02-08T13:27:12.874Z (over 1 year ago)
- Topics: api, api-client, api-java, gmail, gmail-api, google, google-api, java, oauth2, oauth2-client, oauth2-server, tecknobit
- Language: Java
- Homepage:
- Size: 983 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# GoogleManager
**v1.0.3**
This is a Java Based library useful to work with Google API services
## Implementation
Add the JitPack repository to your build file
### Gradle
- Add it in your root build.gradle at the end of repositories
#### Gradle (Short)
```gradle
repositories {
...
maven { url 'https://jitpack.io' }
}
```
#### Gradle (Kotlin)
```gradle
repositories {
...
maven("https://jitpack.io")
}
```
- Add the dependency
#### Gradle (Short)
```gradle
dependencies {
implementation 'com.github.N7ghtm4r3:GoogleManager:1.0.3'
}
```
#### Gradle (Kotlin)
```gradle
dependencies {
implementation("com.github.N7ghtm4r3:GoogleManager:1.0.3")
}
```
### Maven
- Add it in your root build.gradle at the end of repositories
```xml
jitpack.io
https://jitpack.io
```
- Add the dependency
```xml
com.github.N7ghtm4r3
GoogleManager
1.0.3
```
## 🛠Skills
- Java
## Services available
- Gmail
The other services will be gradually released
## Initial configuration
Before to start you have to create or authorize, from Google API
Console, the new project that you will use in this library:
- Create a project to use in the library if you haven't one yet
- Then you have to choose, and **enable**, the API services that you need
from this page
- After chosen the API services that you need, you have
to configure consent screen to be allowed to
use **OAuth 2.0 Client IDs** service (this library use **only** this as authentication mode)
- After configured the consent screen, you have to create and
configure OAuth client ID to copy the
**Client ID** and the **Client secret** or download the JSON file with these credentials, in this case you need to
parse
by yourself to get the **Client ID** and the **Client secret**.
**Note:** based on your choose for **Application
type** you have to configure by yourself details such as **host**, **port**, **callback path**, etc
- After these operations you and your project are ready to use **GoogleManager** library!
## Usage/Examples
#### Execution
For any library manager you need to instantiate it like this:
```java
// choose the manager for example: Gmail, etc
GoogleManager manager = new GoogleManager(clientId,clientSecret,userId, /* params of the constructor chosen */);
// and then use it
manager.makeSomething();
```
To avoid re-entering credentials for each manager, you can instantiate managers like this:
```java
// choose the manager for example: Gmail, etc
GoogleManager firstManager = new GoogleManager(clientId,clientSecret,userId, /* params of the constructor chosen */);
// and then use it
firstManager.makeSomething();
// you don't need to insert all credentials to make manager work
GoogleManager secondManager = new GoogleManager(); // same credentials used
// and then use it
secondManager.makeSomething();
```
#### Responses
Library give to you the opportunity to customize the return object after a request, the possibilities are:
- **JSON:** return response formatted as **JSON** (**org.json.JSONObject** or **org.json.JSONArray**)
- **STRING:** return response formatted as **String**
- **LIBRARY_OBJECT:** return response formatted as custom object offered by **GoogleManager's library**
You find the constants in **GoogleManager.ReturnFormat enum**
```java
// choose the manager for example: Gmail, etc
GoogleManager manager = new GoogleManager(clientId,clientSecret,userId, /* params of the constructor chosen */);
// method to return directly a library given by library
manager.someRequest(); // in this case will be returned directly a LIBRARY_OBJECT
// method to customize the format of the return
manager.someRequest(ReturnFormat.JSON); // in this case will be returned response in JSON format
```
## Authors
- [@N7ghtm4r3](https://www.github.com/N7ghtm4r3)
## Support
If you need help using the library or encounter any problems or bugs, please contact us via the following links:
- Support via email
- Support via GitHub
Thank you for your help!
## Badges
[](https://play.google.com/store/apps/developer?id=Tecknobit)
[](https://twitter.com/tecknobit)
[](https://developers.google.com/apis-explorer/)
[](https://www.oracle.com/java/)
[](https://jitpack.io/#N7ghtm4r3/GoogleManager)
## Donations
If you want support project and developer
| Crypto | Address| Network |
| ------------- | ------------- | ------------- |
|  | **3H3jyCzcRmnxroHthuXh22GXXSmizin2yp** | Bitcoin |
|  | **0x1b45bc41efeb3ed655b078f95086f25fc83345c4** | Ethereum |
If you want support project and developer
with PayPal
Copyright © 2024 Tecknobit