Skip to content
This repository was archived by the owner on Apr 9, 2024. It is now read-only.

Commit 413f717

Browse files
committed
+ README
1 parent 9ca6575 commit 413f717

File tree

10 files changed

+279
-1
lines changed

10 files changed

+279
-1
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/target/

.idea/dictionaries/Thoma.xml

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/uiDesigner.xml

Lines changed: 124 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/vcs.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

LISENCE.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2019 Fortnite-API.com
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Fortnite-API.com Wrapper
2+
This wrapper is wrote in Kotlin but is fully supported in Java. But Kotlin is very recommended.
3+
4+
NOTE: This is not supported for Java 12+
5+
6+
#Examples
7+
8+
######Java:
9+
```java
10+
// Creates a new instance of the FortniteAPI class
11+
FortniteAPI api = new FortniteAPI.Builder()
12+
.setKey("{KEY}") // An API-Key is optional
13+
.setLanguage(Language.EN) // Optional, Default is EN
14+
.setClient({OkHttpClient}) // Optional
15+
.build();
16+
// This class has all the methods
17+
CosmeticEndpoint cosmeticEndpoint = api.getCosmeticEndpoint();
18+
// Sends a request to /v2/cosmetics/br
19+
val cosmetics = cosmeticEndpoint.getCosmetics().data;
20+
for(Cosmetic cosmetic : cosmetics){
21+
System.out.println(cosmetic.name);
22+
}
23+
```
24+
######Kotlin
25+
```kotlin
26+
// Creates a new instance of the FortniteAPI class
27+
val api: FortniteAPI = FortniteAPI.Builder()
28+
.setKey("{KEY}") // An API-Key is optional
29+
.setLanguage(Language.EN) // Optional, Default is EN
30+
.setClient({OkHttpClient}) // Optional
31+
.build()
32+
// This class has all the methods
33+
val cosmeticEndpoint = api.getCosmeticEndpoint()
34+
// Sends a request to /v2/cosmetics/br
35+
val cosmetics = cosmeticEndpoint.getCosmetics().data
36+
for(cosmetic in cosmetics){
37+
println(cosmetic.name)
38+
}
39+
```
40+
The rest of the classes/methods are pretty much self-explanatory.
41+
If you have any issues, suggestions or improvements; Please send me a DM on Discord.

dependency-reduced-pom.xml

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
3+
<modelVersion>4.0.0</modelVersion>
4+
<groupId>com.thoo</groupId>
5+
<artifactId>WrapperFortniteAPI</artifactId>
6+
<version>2.3</version>
7+
<build>
8+
<plugins>
9+
<plugin>
10+
<artifactId>maven-compiler-plugin</artifactId>
11+
<configuration>
12+
<source>8</source>
13+
<target>8</target>
14+
</configuration>
15+
</plugin>
16+
<plugin>
17+
<artifactId>maven-shade-plugin</artifactId>
18+
<version>3.2.3</version>
19+
<executions>
20+
<execution>
21+
<phase>package</phase>
22+
<goals>
23+
<goal>shade</goal>
24+
</goals>
25+
</execution>
26+
</executions>
27+
<configuration />
28+
</plugin>
29+
<plugin>
30+
<groupId>org.jetbrains.kotlin</groupId>
31+
<artifactId>kotlin-maven-plugin</artifactId>
32+
<version>${kotlin.version}</version>
33+
<executions>
34+
<execution>
35+
<id>compile</id>
36+
<phase>compile</phase>
37+
<goals>
38+
<goal>compile</goal>
39+
</goals>
40+
</execution>
41+
<execution>
42+
<id>test-compile</id>
43+
<phase>test-compile</phase>
44+
<goals>
45+
<goal>test-compile</goal>
46+
</goals>
47+
</execution>
48+
</executions>
49+
<configuration>
50+
<jvmTarget>1.8</jvmTarget>
51+
</configuration>
52+
</plugin>
53+
</plugins>
54+
</build>
55+
<dependencies>
56+
<dependency>
57+
<groupId>org.jetbrains.kotlin</groupId>
58+
<artifactId>kotlin-test</artifactId>
59+
<version>1.3.72</version>
60+
<scope>test</scope>
61+
<exclusions>
62+
<exclusion>
63+
<artifactId>kotlin-test-common</artifactId>
64+
<groupId>org.jetbrains.kotlin</groupId>
65+
</exclusion>
66+
</exclusions>
67+
</dependency>
68+
</dependencies>
69+
<properties>
70+
<kotlin.version>1.3.72</kotlin.version>
71+
</properties>
72+
</project>

src/test/java/TestJava.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import com.thoo.api.FortniteAPI;
2+
import com.thoo.api.enums.Language;
3+
4+
public class TestJava {
5+
6+
public static void main(String[] args) {
7+
FortniteAPI api = new FortniteAPI.Builder().setLanguage(Language.EN).setDebug(true).build();
8+
}
9+
10+
}
1.19 KB
Binary file not shown.

0 commit comments

Comments
 (0)