Skip to content

Commit

Permalink
Merge pull request #12 from wireapp/WPB-11222
Browse files Browse the repository at this point in the history
feat(move-to-api-v6) #WPB-11222 Update and adapt to Wire backend API …
  • Loading branch information
alexandreferris authored Sep 27, 2024
2 parents b24a628 + 1596758 commit e1a486e
Show file tree
Hide file tree
Showing 18 changed files with 482 additions and 948 deletions.
18 changes: 16 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
# Helium

Wire Client written in Java
Wire Http Client written in Java

Helium implements WireAPI defined in Xenon repository,
making HTTP Rest calls to the Wire backend.

Current backend API targeted version is v6, set host and version with environmental variable "WIRE_API_HOST".


Not all the APIs available are implemented, but Helium should help with the most common task of an SDK to send/receive messages and manage the user's
data.
This API is targeted towards clients or anything that logs in as a User. For a service/bot/server approach take a look at Lithium
(same API contract, but using other endpoints designed for services).

## How to use it?

Expand All @@ -12,11 +23,14 @@ Wire Client written in Java
<dependency>
<groupId>com.wire</groupId>
<artifactId>helium</artifactId>
<version>1.3.0</version>
<version>x.y.z</version>
</dependency>
</dependencies>
```

Create a `LoginClient`, passing a JAX-RS (e.g. Jersey Client) http client previously created, then obtain the user's token
with the login call. Then, create a `API` instance with the same http-client and the user's token.

## How to build the project

Requirements:
Expand Down
51 changes: 19 additions & 32 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>com.wire</groupId>
<artifactId>helium</artifactId>
<version>1.3.1</version>
<version>1.4.0</version>

<name>Helium</name>
<description>User mode for Wire Bots</description>
Expand Down Expand Up @@ -58,16 +58,14 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

<jersey.version>2.32</jersey.version>
<sl4j.version>1.7.36</sl4j.version>
<junit.version>5.8.2</junit.version>
<junit.version>5.10.2</junit.version>
</properties>

<dependencies>
<dependency>
<groupId>com.wire</groupId>
<artifactId>xenon</artifactId>
<version>1.5.1</version>
<version>1.6.1</version>
</dependency>
<dependency>
<groupId>jakarta.ws.rs</groupId>
Expand All @@ -76,42 +74,24 @@
<!--suppress MavenPackageUpdate -->
<version>2.1.6</version>
</dependency>
<dependency>
<groupId>org.glassfish.tyrus.bundles</groupId>
<artifactId>tyrus-standalone-client</artifactId>
<!-- This needs to stay fixed on 1.x.y version due to compatibility with dropwizard -->
<!--suppress MavenPackageUpdate -->
<version>1.13.1</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-client</artifactId>
<!-- This needs to stay fixed on 2.x.y version due to compatibility with dropwizard -->
<!--suppress MavenPackageUpdate -->
<version>${jersey.version}</version>
<version>2.34</version>
</dependency>
<dependency>
<groupId>org.flywaydb</groupId>
<artifactId>flyway-core</artifactId>
<version>8.5.12</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.inject</groupId>
<artifactId>jersey-hk2</artifactId>
<!-- This needs to stay fixed on 2.x.y version due to compatibility with dropwizard -->
<!--suppress MavenPackageUpdate -->
<version>${jersey.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${sl4j.version}</version>
<scope>test</scope>
<version>9.22.3</version>
</dependency>

<!--Test-->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>${sl4j.version}</version>
<artifactId>slf4j-simple</artifactId>
<version>2.0.13</version>
<scope>test</scope>
</dependency>
<dependency>
Expand All @@ -123,12 +103,12 @@
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>42.3.8</version>
<version>42.7.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<artifactId>junit-jupiter-api</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
Expand All @@ -141,7 +121,7 @@
<dependency>
<groupId>com.fasterxml.jackson.jaxrs</groupId>
<artifactId>jackson-jaxrs-json-provider</artifactId>
<version>2.14.2</version>
<version>2.17.2</version>
</dependency>
</dependencies>

Expand Down Expand Up @@ -215,4 +195,11 @@
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>maven_central</id>
<name>Maven Central</name>
<url>https://repo.maven.apache.org/maven2/</url>
</repository>
</repositories>
</project>
Loading

0 comments on commit e1a486e

Please sign in to comment.