Skip to content

Commit

Permalink
update README, version bumps
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanCheshire committed Sep 17, 2024
1 parent e50787a commit 6afe466
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 5 deletions.
22 changes: 19 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,16 @@ Jitpack recommends it be placed at the end of the repositories scope.
`maven { url 'https://jitpack.io' }`

Then add the following to your dependencies:
`implementation 'com.github.nathancheshire:gravatarjavaclient:2.0.3'`.
`implementation 'com.github.nathancheshire:gravatarjavaclient:2.0.4'`.

# Jitpack

These links are mostly for me but if you would like to view the official Jitpack build log or artifacts list, these
are the following links:

Artifacts: https://jitpack.io/com/github/nathancheshire/gravatarjavaclient/2.0.3/
Artifacts: https://jitpack.io/com/github/nathancheshire/gravatarjavaclient/2.0.4/

Build log: https://jitpack.io/com/github/nathancheshire/gravatarjavaclient/2.0.3/build.log
Build log: https://jitpack.io/com/github/nathancheshire/gravatarjavaclient/2.0.4/build.log

## API Support

Expand Down Expand Up @@ -75,6 +75,22 @@ GravatarProfile profileWithAuthenticatedFields = GravatarProfileRequest.fromEmai
.getProfile();
```

For generating QR codes:

```java
// Create the request
GravatarQrCodeRequest request = GravatarQrCodeRequest.fromEmail("[email protected]")
.setSize(800)
.setImageType(GravatarQrImageType.USER)
.setVersion(GravatarQrImageVersion.THREE);

// Get a BufferedImage
BufferedImage image = request.getBufferedImage();

// Save to a local file (API returns a PNG image)
boolean wasSaved = request.saveTo(new File("path/to/your/file.png"));
```

Because `GravatarProfileRequest` accepts a `GravatarProfileTokenProvider` instead of a literal string, you as the
developer have the ability to prevent token strings from appearing in the string pool if you deem it to be worth
the effort. Instead of simply returning a string from the provider, the provider returns a byte array which allows
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ java {
}

group 'com.github.natche.gravatarjavaclient'
version '2.0.3'
version '2.0.4'

repositories {
mavenCentral()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ private Hasher(String algorithm) {
*
* @param algorithm the algorithm
* @return a new Hasher instance using the provided algorithm
* @throws NullPointerException if the provided algorithm is null
* @throws NullPointerException if the provided algorithm is null
* @throws IllegalArgumentException if the provided algorithm is empty
*/
public static Hasher fromAlgorithm(String algorithm) {
Expand Down

0 comments on commit 6afe466

Please sign in to comment.