Skip to content

Commit a0c203c

Browse files
author
Damian Staszewski
authored
Merge pull request #19 from stachu540/dev
Prepare 2.0
2 parents b2cbb30 + 084af4f commit a0c203c

File tree

128 files changed

+1512
-18530
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

128 files changed

+1512
-18530
lines changed

.gitignore

Lines changed: 3 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -15,28 +15,9 @@ buildNumber.properties
1515

1616
!.github/
1717

18-
### JetBrains template
18+
### JetBrains
1919
.idea/**
2020
*.iml
2121

22-
## File-based project format:
23-
*.iws
24-
25-
## Plugin-specific files:
26-
27-
# IntelliJ
28-
/out/
29-
30-
# mpeltonen/sbt-idea plugin
31-
.idea_modules/
32-
33-
# JIRA plugin
34-
atlassian-ide-plugin.xml
35-
36-
# Crashlytics plugin (for Android Studio and IntelliJ)
37-
com_crashlytics_export_strings.xml
38-
crashlytics.properties
39-
crashlytics-build.properties
40-
fabric.properties
41-
42-
deploying/deploy.asc
22+
src/test/java/com/github/stachu540/hirezapi/*.java
23+
!src/test/java/com/github/stachu540/hirezapi/HiRezAPITest.java

.travis.yml

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,14 @@ jdk:
33
- oraclejdk8
44

55
cache:
6-
files:
7-
- /tmp/.hirezsessions
86
directories:
97
- ~/.m2/repository
108

11-
before_install:
12-
- chmod +x $TRAVIS_BUILD_DIR/deploying/*.sh
13-
- $TRAVIS_BUILD_DIR/deploying/pre-deploy.sh
149
install:
15-
- mvn install -P !build-extras -Dmaven.javadoc.skip=true -B
16-
- mvn dependency:go-offline -P !build-extras -Dmaven.javadoc.skip=true -B
10+
- mvn install -Dmaven.javadoc.skip=true -P !build-extras -B
11+
- mvn dependency:go-offline -Dmaven.javadoc.skip=true -P !build-extras -B
1712
script:
18-
- mvn test -DskipTest=false -P !build-extras -B
19-
13+
- mvn test -DskipTest=false -Dmaven.javadoc.skip=true -P !build-extras -B
14+
- mvn cobertura:cobertura -Dmaven.javadoc.skip=true -P !build-extras -B
2015
after_success:
21-
- $TRAVIS_BUILD_DIR/deploying/deploy.sh
16+
- bash <(curl -s https://codecov.io/bash)

README.md

Lines changed: 58 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
Master: [![Build Status](https://travis-ci.org/stachu540/HiRezAPI.svg?branch=master)](https://travis-ci.org/stachu540/HiRezAPI)
2-
3-
Dev: [![Build Status](https://travis-ci.org/stachu540/HiRezAPI.svg?branch=dev)](https://travis-ci.org/stachu540/HiRezAPI)
1+
[![Build Status](https://travis-ci.org/stachu540/HiRezAPI.svg)](https://travis-ci.org/stachu540/HiRezAPI)
2+
[![codecov](https://codecov.io/gh/stachu540/HiRezAPI/branch/master/graph/badge.svg)](https://codecov.io/gh/stachu540/HiRezAPI)
3+
[![Javadocs](https://img.shields.io/badge/Javadoc-v2.0-brightgreen.svg)](https://jitpack.io/com/github/stachu540/HiRezAPI/v2.0/javadoc/)
4+
[![Release](https://jitpack.io/v/stachu540/HiRezAPI.svg)](https://jitpack.io/#stachu540/HiRezAPI)
45

56
# HiRezAPI
67

@@ -20,58 +21,89 @@ All features will be on [Projects](https://github.com/stachu540/HiRezAPI/project
2021
1. To access the APIs you'll need your own set of credentials which consist of a Developer ID (**devId**) and an Authentication Key (**authKey**). To getting those credentials, you need filling form on this link:
2122
https://fs12.formsite.com/HiRez/form48/secure_index.html
2223

23-
2. For next step. Add dependency to `pom.xml` build.
24+
2. Choose your Build
25+
#### Maven
26+
Add to `pom.xml` build.
2427
```xml
25-
<dependency>
26-
<groupId>pl.stachuofficial</groupId>
27-
<artifactId>HiRezAPI</artifactId>
28-
<version>1.1</version>
29-
</dependency>
28+
<repositories>
29+
...
30+
<repository>
31+
<id>jitpack.io</id>
32+
<url>https://jitpack.io</url>
33+
</repository>
34+
</repositories>
35+
...
36+
<dependencies>
37+
...
38+
<dependency>
39+
<groupId>com.github.stachu540</groupId>
40+
<artifactId>HiRezAPI</artifactId>
41+
<version>2.0</version>
42+
</dependency>
43+
</dependencies>
44+
...
45+
```
46+
#### Gradle
47+
Add to `build.gradle` build.
48+
```groovy
49+
...
50+
repositories {
51+
...
52+
maven {
53+
url "https://jitpack.io"
54+
}
55+
}
56+
...
57+
dependencies {
58+
...
59+
compile "com.github.stachu540:HiRezAPI:2.0"
60+
}
61+
...
3062
```
3163

32-
3. To starting using script try to using example below:
64+
4. To starting using script try to using example below:
3365

3466
For examples I will use example credentials
35-
* **DevId**: 1004
36-
* **AuthKey**: 23DF3C7E9BD14D84BF892AD206B6755C
67+
**DevId**: 1004
68+
**AuthKey**: 23DF3C7E9BD14D84BF892AD206B6755C
3769

38-
70+
a. For Smite **PC** i want getting player info for "HiRezTina"
3971
```java
40-
// For Smite PC, I want getting player info for "HiRezTina"
4172
package example;
4273

43-
import pl.stachuofficial.HiRezAPI; // Main class
44-
import pl.stachuofficial.hirezstudios.Smite; // for importing enum platforms
45-
import pl.stachuofficial.util.StringData; // for using variable data
74+
import com.github.stachu540.hirezapi.HiRezAPI; // Main class
75+
import com.github.stachu540.hirezapi.api.Smite; // for importing enum platforms
4676

4777
class SmitePlayer {
4878
public static void main(String[] args) {
4979
HiRezAPI api = new HiRezAPI("1004", "23DF3C7E9BD14D84BF892AD206B6755C");
50-
StringData mydata = api.smite(Smite.Platform.PC).getPlayer("HiRezTina");
80+
Smite smite = api.getFor(com.github.stachu540.hirezapi.enums.url.Smite.PC);
5181
// cause data returning as JSONArray i will use toJsonArray() method
52-
System.out.println(mydata.toJsonArray());
82+
System.out.println(smite.getPlayer("HiRezTina"));
5383
}
5484
}
5585
```
86+
87+
b. For Paladins **XBOX** i want know about server status.
88+
89+
5690
```java
57-
// For Paladins XBOX, I want know about server status.
5891
package example;
5992

60-
import pl.stachuofficial.HiRezAPI; // Main class
61-
import pl.stachuofficial.hirezstudios.Paladins; // for importing enum platforms
62-
import pl.stachuofficial.util.StringData; // for using variable data
93+
import com.github.stachu540.hirezapi.HiRezAPI; // Main class
94+
import com.github.stachu540.hirezapi.api.Paladins; // for importing enum platforms
6395

6496
class PaladinsStatusServer {
6597
public static void main(String[] args) {
6698
HiRezAPI api = new HiRezAPI("1004", "23DF3C7E9BD14D84BF892AD206B6755C");
67-
StringData mydata = api.paladins(Paladins.Platform.XBOX).getServerStatus();
99+
Paladins paladins = api.getFor(com.github.stachu540.hirezapi.enums.url.Paladins.XBOX);
68100
// cause data returning as JSONArray i will use toJsonArray() method
69-
System.out.println(mydata.toJsonArray());
101+
System.out.println(mydata.getServerStatus());
70102
}
71103
}
72104
```
73105

74106
For some more detail's, check out [source documentation](https://stachu540.github.io/HiRezAPI/).
75107

76108
## Question and suggestions
77-
Any more questions or some suggestions changes are welcome. Don't be shy, just open your [Issues](https://github.com/stachu540/HiRezAPI/issues) if you have some problem. [Pull Request's](https://github.com/stachu540/HiRezAPI/pulls) and any other contribution are welcome.
109+
Any more questions or some suggestions changes are welcome. Don't be shy, just open your [Issues](https://github.com/stachu540/HiRezAPI/issues) if you have some problem. [Pull Request's](https://github.com/stachu540/HiRezAPI/pulls) and any other contribution are welcome.

codecov.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
codecov:
2+
notify:
3+
require_ci_to_pass: yes
4+
max_report_age: off
5+
6+
comment:
7+
branches:
8+
- dev
9+
- feature/*
10+
- fix/*

deploying/deploy.asc.enc

-9.33 KB
Binary file not shown.

deploying/deploy.sh

Lines changed: 0 additions & 7 deletions
This file was deleted.

deploying/pre-deploy.sh

Lines changed: 0 additions & 3 deletions
This file was deleted.

deploying/settings.xml

Lines changed: 0 additions & 23 deletions
This file was deleted.

docs/allclasses-frame.html

Lines changed: 0 additions & 34 deletions
This file was deleted.

docs/allclasses-noframe.html

Lines changed: 0 additions & 34 deletions
This file was deleted.

0 commit comments

Comments
 (0)