Skip to content

Commit

Permalink
Fix groupId
Browse files Browse the repository at this point in the history
  • Loading branch information
brenoepics committed Jan 11, 2024
1 parent cda96e1 commit ab0dc74
Show file tree
Hide file tree
Showing 52 changed files with 160 additions and 142 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ An Unofficial Java library for translating text using Azure AI Cognitive Service
The following example translates a simple Hello World to French.

```java
import tech.brenoepic.at4j.AzureApi;
import tech.brenoepic.at4j.AzureApiBuilder;
import tech.brenoepic.at4j.azure.BaseURL;
import tech.brenoepic.at4j.data.request.TranslateParams;
import tech.brenoepic.at4j.data.response.TranslationResponse;
import com.github.brenoepics.at4j.AzureApi;
import com.github.brenoepics.at4j.AzureApiBuilder;
import com.github.brenoepics.at4j.azure.BaseURL;
import com.github.brenoepics.at4j.data.request.TranslateParams;
import com.github.brenoepics.at4j.data.response.TranslationResponse;

public class Main {

Expand Down Expand Up @@ -62,7 +62,7 @@ The recommended way to get AT4J is to use a build manager, like Gradle or Maven.

```gradle
repositories { mavenCentral() }
dependencies { implementation 'tech.brenoepic:at4j:0.0.1' }
dependencies { implementation 'com.github.brenoepics:at4j:0.0.1' }
```

#### Maven
Expand All @@ -71,7 +71,7 @@ Add the following dependency to your `pom.xml`:

```xml
<dependency>
<groupId>tech.brenoepic</groupId>
<groupId>com.github.brenoepics</groupId>
<artifactId>at4j</artifactId>
<version>0.0.1</version>
</dependency>
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>tech.brenoepic</groupId>
<groupId>com.github.brenoepics</groupId>
<artifactId>at4j</artifactId>
<version>0.0.1</version>
<name>Azure Translator For Java</name>
Expand Down Expand Up @@ -74,7 +74,7 @@
<archive>
<manifest>
<addClasspath>true</addClasspath>
<mainClass>tech.brenoepic.at4j.AT4J</mainClass>
<mainClass>com.github.brenoepics.at4j.AT4J</mainClass>
</manifest>
</archive>
</configuration>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package tech.brenoepic.at4j;
package com.github.brenoepics.at4j;

import java.io.IOException;
import java.io.InputStream;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
package tech.brenoepic.at4j;
package com.github.brenoepics.at4j;

import java.util.Collection;
import java.util.Optional;
import java.util.concurrent.CompletableFuture;
import tech.brenoepic.at4j.azure.BaseURL;
import tech.brenoepic.at4j.azure.lang.Language;
import tech.brenoepic.at4j.core.thread.ThreadPool;
import tech.brenoepic.at4j.data.DetectedLanguage;
import tech.brenoepic.at4j.data.request.AvailableLanguagesParams;
import tech.brenoepic.at4j.data.request.DetectLanguageParams;
import tech.brenoepic.at4j.data.request.TranslateParams;
import tech.brenoepic.at4j.data.response.TranslationResponse;

import com.github.brenoepics.at4j.azure.BaseURL;
import com.github.brenoepics.at4j.data.DetectedLanguage;
import com.github.brenoepics.at4j.azure.lang.Language;
import com.github.brenoepics.at4j.core.thread.ThreadPool;
import com.github.brenoepics.at4j.data.request.AvailableLanguagesParams;
import com.github.brenoepics.at4j.data.request.DetectLanguageParams;
import com.github.brenoepics.at4j.data.request.TranslateParams;
import com.github.brenoepics.at4j.data.response.TranslationResponse;

/**
* This class is the most important class of AT4J, as it contains the main methods for translating
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package tech.brenoepic.at4j;
package com.github.brenoepics.at4j;

import com.github.brenoepics.at4j.azure.BaseURL;
import com.github.brenoepics.at4j.core.AzureApiImpl;
import okhttp3.OkHttpClient;
import tech.brenoepic.at4j.azure.BaseURL;
import tech.brenoepic.at4j.core.AzureApiImpl;

/**
* Builder class for constructing instances of AzureApi.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package tech.brenoepic.at4j.azure;
package com.github.brenoepics.at4j.azure;

/**
* The base URL of the Azure Translator API. The list of available domains can be found <a
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package tech.brenoepic.at4j.azure.lang;
package com.github.brenoepics.at4j.azure.lang;

import com.fasterxml.jackson.databind.node.ObjectNode;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package tech.brenoepic.at4j.azure.lang;
package com.github.brenoepics.at4j.azure.lang;

public enum LanguageDirection {
LTR,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package tech.brenoepic.at4j.core;
package com.github.brenoepics.at4j.core;

import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
Expand All @@ -7,22 +7,23 @@
import java.util.Collection;
import java.util.Optional;
import java.util.concurrent.CompletableFuture;

import com.github.brenoepics.at4j.AzureApi;
import com.github.brenoepics.at4j.azure.BaseURL;
import com.github.brenoepics.at4j.core.ratelimit.RateLimitManager;
import com.github.brenoepics.at4j.core.thread.ThreadPool;
import com.github.brenoepics.at4j.data.DetectedLanguage;
import com.github.brenoepics.at4j.data.Translation;
import okhttp3.OkHttpClient;
import tech.brenoepic.at4j.AzureApi;
import tech.brenoepic.at4j.azure.BaseURL;
import tech.brenoepic.at4j.azure.lang.Language;
import tech.brenoepic.at4j.core.ratelimit.RateLimitManager;
import tech.brenoepic.at4j.core.thread.ThreadPool;
import tech.brenoepic.at4j.core.thread.ThreadPoolImpl;
import tech.brenoepic.at4j.data.DetectedLanguage;
import tech.brenoepic.at4j.data.Translation;
import tech.brenoepic.at4j.data.request.AvailableLanguagesParams;
import tech.brenoepic.at4j.data.request.DetectLanguageParams;
import tech.brenoepic.at4j.data.request.TranslateParams;
import tech.brenoepic.at4j.data.response.TranslationResponse;
import tech.brenoepic.at4j.util.rest.RestEndpoint;
import tech.brenoepic.at4j.util.rest.RestMethod;
import tech.brenoepic.at4j.util.rest.RestRequest;
import com.github.brenoepics.at4j.azure.lang.Language;
import com.github.brenoepics.at4j.core.thread.ThreadPoolImpl;
import com.github.brenoepics.at4j.data.request.AvailableLanguagesParams;
import com.github.brenoepics.at4j.data.request.DetectLanguageParams;
import com.github.brenoepics.at4j.data.request.TranslateParams;
import com.github.brenoepics.at4j.data.response.TranslationResponse;
import com.github.brenoepics.at4j.util.rest.RestEndpoint;
import com.github.brenoepics.at4j.util.rest.RestMethod;
import com.github.brenoepics.at4j.util.rest.RestRequest;

public class AzureApiImpl implements AzureApi {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
package tech.brenoepic.at4j.core.exceptions;
package com.github.brenoepics.at4j.core.exceptions;

import java.util.Optional;

import com.github.brenoepics.at4j.util.rest.RestRequestInformation;
import com.github.brenoepics.at4j.util.rest.RestRequestResponseInformation;
import tech.brenoepic.at4j.util.rest.*;

/** This exception is always thrown whenever a request to azure failed. */
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package tech.brenoepic.at4j.core.exceptions;
package com.github.brenoepics.at4j.core.exceptions;

import tech.brenoepic.at4j.util.rest.RestRequestInformation;
import tech.brenoepic.at4j.util.rest.RestRequestResponseInformation;
import com.github.brenoepics.at4j.util.rest.RestRequestInformation;
import com.github.brenoepics.at4j.util.rest.RestRequestResponseInformation;

/**
* Represents a function that accepts four arguments ({@code Exception}, {@code String}, {@code
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package tech.brenoepic.at4j.core.exceptions;
package com.github.brenoepics.at4j.core.exceptions;

import tech.brenoepic.at4j.util.rest.RestRequestInformation;
import tech.brenoepic.at4j.util.rest.RestRequestResponseInformation;
import com.github.brenoepics.at4j.util.rest.RestRequestResponseInformation;
import com.github.brenoepics.at4j.util.rest.RestRequestInformation;

/** When we sent a bad request (HTTP response code 400). */
public class BadRequestException extends AzureException {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package tech.brenoepic.at4j.core.exceptions;
package com.github.brenoepics.at4j.core.exceptions;

import tech.brenoepic.at4j.util.rest.RestRequestInformation;
import tech.brenoepic.at4j.util.rest.RestRequestResponseInformation;
import com.github.brenoepics.at4j.util.rest.RestRequestInformation;
import com.github.brenoepics.at4j.util.rest.RestRequestResponseInformation;

public class ForbiddenException extends AzureException {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package tech.brenoepic.at4j.core.exceptions;
package com.github.brenoepics.at4j.core.exceptions;

import tech.brenoepic.at4j.util.rest.RestRequestInformation;
import tech.brenoepic.at4j.util.rest.RestRequestResponseInformation;
import com.github.brenoepics.at4j.util.rest.RestRequestInformation;
import com.github.brenoepics.at4j.util.rest.RestRequestResponseInformation;

public class InternalServerErrorException extends AzureException {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package tech.brenoepic.at4j.core.exceptions;
package com.github.brenoepics.at4j.core.exceptions;

import tech.brenoepic.at4j.util.rest.RestRequestInformation;
import tech.brenoepic.at4j.util.rest.RestRequestResponseInformation;
import com.github.brenoepics.at4j.util.rest.RestRequestInformation;
import com.github.brenoepics.at4j.util.rest.RestRequestResponseInformation;

public class MethodNotAllowedException extends AzureException {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package tech.brenoepic.at4j.core.exceptions;
package com.github.brenoepics.at4j.core.exceptions;

import tech.brenoepic.at4j.util.rest.RestRequestInformation;
import tech.brenoepic.at4j.util.rest.RestRequestResponseInformation;
import com.github.brenoepics.at4j.util.rest.RestRequestResponseInformation;
import com.github.brenoepics.at4j.util.rest.RestRequestInformation;

/** When something was not found (HTTP response code 404). */
public class NotFoundException extends BadRequestException {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package tech.brenoepic.at4j.core.exceptions;
package com.github.brenoepics.at4j.core.exceptions;

import tech.brenoepic.at4j.util.rest.RestRequestInformation;
import com.github.brenoepics.at4j.util.rest.RestRequestInformation;

/** When we encounter a rate limit and run out of retiring. */
public class RatelimitException extends AzureException {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package tech.brenoepic.at4j.core.exceptions;
package com.github.brenoepics.at4j.core.exceptions;

import tech.brenoepic.at4j.util.rest.RestRequestInformation;
import tech.brenoepic.at4j.util.rest.RestRequestResponseInformation;
import com.github.brenoepics.at4j.util.rest.RestRequestInformation;
import com.github.brenoepics.at4j.util.rest.RestRequestResponseInformation;

public class RequestTimeoutException extends AzureException {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package tech.brenoepic.at4j.core.exceptions;
package com.github.brenoepics.at4j.core.exceptions;

import tech.brenoepic.at4j.util.rest.RestRequestInformation;
import tech.brenoepic.at4j.util.rest.RestRequestResponseInformation;
import com.github.brenoepics.at4j.util.rest.RestRequestInformation;
import com.github.brenoepics.at4j.util.rest.RestRequestResponseInformation;

public class ServiceUnavailableException extends AzureException {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package tech.brenoepic.at4j.core.exceptions;
package com.github.brenoepics.at4j.core.exceptions;

import tech.brenoepic.at4j.util.rest.RestRequestInformation;
import tech.brenoepic.at4j.util.rest.RestRequestResponseInformation;
import com.github.brenoepics.at4j.util.rest.RestRequestInformation;
import com.github.brenoepics.at4j.util.rest.RestRequestResponseInformation;

/** When we sent a bad request (HTTP response code 400). */
public class UnauthorizedException extends AzureException {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package tech.brenoepic.at4j.core.exceptions;
package com.github.brenoepics.at4j.core.exceptions;

import tech.brenoepic.at4j.util.rest.RestRequestInformation;
import tech.brenoepic.at4j.util.rest.RestRequestResponseInformation;
import com.github.brenoepics.at4j.util.rest.RestRequestInformation;
import com.github.brenoepics.at4j.util.rest.RestRequestResponseInformation;

public class UnsupportedMediaTypeException extends AzureException {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package tech.brenoepic.at4j.core.ratelimit;
package com.github.brenoepics.at4j.core.ratelimit;

import java.time.Duration;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
package tech.brenoepic.at4j.core.ratelimit;
package com.github.brenoepics.at4j.core.ratelimit;

import java.util.HashSet;
import java.util.Objects;
import java.util.Set;
import java.util.concurrent.CompletableFuture;
import java.util.function.Function;

import com.github.brenoepics.at4j.util.logging.LoggerUtil;
import okhttp3.Response;
import org.apache.logging.log4j.Logger;
import tech.brenoepic.at4j.core.AzureApiImpl;
import tech.brenoepic.at4j.core.exceptions.AzureException;
import tech.brenoepic.at4j.util.logging.LoggerUtil;
import tech.brenoepic.at4j.util.rest.RestRequest;
import tech.brenoepic.at4j.util.rest.RestRequestResponseInformationImpl;
import tech.brenoepic.at4j.util.rest.RestRequestResult;
import com.github.brenoepics.at4j.core.AzureApiImpl;
import com.github.brenoepics.at4j.core.exceptions.AzureException;
import com.github.brenoepics.at4j.util.rest.RestRequest;
import com.github.brenoepics.at4j.util.rest.RestRequestResponseInformationImpl;
import com.github.brenoepics.at4j.util.rest.RestRequestResult;

/** This class manages rate-limits and keeps track of them. */
public class RateLimitManager {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package tech.brenoepic.at4j.core.ratelimit;
package com.github.brenoepics.at4j.core.ratelimit;

/** Can be used to implement ratelimits. */
public interface RateLimiter {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
package tech.brenoepic.at4j.core.ratelimit;
package com.github.brenoepics.at4j.core.ratelimit;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentLinkedQueue;
import tech.brenoepic.at4j.AzureApi;
import tech.brenoepic.at4j.core.AzureApiImpl;
import tech.brenoepic.at4j.util.rest.RestEndpoint;
import tech.brenoepic.at4j.util.rest.RestRequest;

import com.github.brenoepics.at4j.AzureApi;
import com.github.brenoepics.at4j.core.AzureApiImpl;
import com.github.brenoepics.at4j.util.rest.RestEndpoint;
import com.github.brenoepics.at4j.util.rest.RestRequest;

public class RatelimitBucket {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package tech.brenoepic.at4j.core.thread;
package com.github.brenoepics.at4j.core.thread;

import java.util.concurrent.atomic.AtomicInteger;
import org.jetbrains.annotations.NotNull;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package tech.brenoepic.at4j.core.thread;
package com.github.brenoepics.at4j.core.thread;

import java.util.Optional;
import java.util.concurrent.CompletableFuture;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package tech.brenoepic.at4j.core.thread;
package com.github.brenoepics.at4j.core.thread;

import java.util.Optional;
import java.util.concurrent.*;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package tech.brenoepic.at4j.data;
package com.github.brenoepics.at4j.data;

import com.fasterxml.jackson.databind.node.ObjectNode;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package tech.brenoepic.at4j.data;
package com.github.brenoepics.at4j.data;

import com.fasterxml.jackson.databind.node.ObjectNode;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package tech.brenoepic.at4j.data.request;
package com.github.brenoepics.at4j.data.request;

import java.util.Collections;
import java.util.List;
import tech.brenoepic.at4j.data.request.optional.LanguageScope;

import com.github.brenoepics.at4j.data.request.optional.LanguageScope;

public class AvailableLanguagesParams {
private List<LanguageScope> scope = List.of(LanguageScope.TRANSLATION);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package tech.brenoepic.at4j.data.request;
package com.github.brenoepics.at4j.data.request;

import com.fasterxml.jackson.databind.node.ArrayNode;
import com.fasterxml.jackson.databind.node.JsonNodeFactory;
Expand Down
Loading

0 comments on commit ab0dc74

Please sign in to comment.