Skip to content

Commit 3f9ea86

Browse files
author
Alexander Birkner
committed
Initial public commit, happy coding github world
0 parents  commit 3f9ea86

File tree

115 files changed

+8127
-0
lines changed

Some content is hidden

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

115 files changed

+8127
-0
lines changed

.gitignore

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
### Intellij ###
2+
3+
*.iml
4+
5+
## Directory-based project format:
6+
7+
# User-specific stuff:
8+
.idea/workspace.xml
9+
.idea/tasks.xml
10+
.idea/dictionaries
11+
12+
# Sensitive or high-churn files:
13+
.idea/dataSources.ids
14+
.idea/dataSources.xml
15+
.idea/sqlDataSources.xml
16+
.idea/dynamic.xml
17+
.idea/uiDesigner.xml
18+
19+
# Gradle:
20+
.idea/gradle.xml
21+
.idea/libraries
22+
23+
# Mongo Explorer plugin:
24+
.idea/mongoSettings.xml
25+
26+
## File-based project format:
27+
*.ipr
28+
*.iws
29+
30+
## Plugin-specific files:
31+
32+
# IntelliJ
33+
/out/
34+
35+
# mpeltonen/sbt-idea plugin
36+
.idea_modules/
37+
38+
# JIRA plugin
39+
atlassian-ide-plugin.xml
40+
41+
# Crashlytics plugin (for Android Studio and IntelliJ)
42+
com_crashlytics_export_strings.xml
43+
crashlytics.properties
44+
crashlytics-build.properties
45+
46+
47+
### Maven ###
48+
target/
49+
50+
51+
# MAAAAAC
52+
.DS_Store

README.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
Nitrapi-Java
2+
============
3+
4+
Java based SDK for the Nitrapi RESTful API.
5+
6+
Using
7+
-----
8+
9+
- Install Maven 3 (mvn) on your build system
10+
- Run the build.sh script in the main directory
11+
- Include the generated .jar file from the target directoy into your Java application
12+
13+
Example
14+
-------
15+
16+
``` java
17+
Nitrapi api = new Nitrapi("<access token>");
18+
try {
19+
Service[] services = api.getServices();
20+
// ...
21+
} catch (NitrapiErrorException e) {
22+
// There was an error in our request to the api.
23+
// ...
24+
} catch (NitrapiHttpException e) {
25+
// There was an error connecting to the api.
26+
// ...
27+
}
28+
29+
```

build.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/bash
2+
3+
echo "Compiling Nitrapi Jar File"
4+
5+
mvn compile assembly:single

pom.xml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<modelVersion>4.0.0</modelVersion>
6+
7+
<groupId>net.nitrado</groupId>
8+
<artifactId>nitrapi</artifactId>
9+
<version>1.0-SNAPSHOT</version>
10+
11+
12+
<dependencies>
13+
<dependency>
14+
<groupId>junit</groupId>
15+
<artifactId>junit</artifactId>
16+
<version>4.8.2</version>
17+
<scope>test</scope>
18+
</dependency>
19+
<dependency>
20+
<groupId>com.google.code.gson</groupId>
21+
<artifactId>gson</artifactId>
22+
<version>2.4</version>
23+
</dependency>
24+
<!-- <dependency>
25+
<groupId>org.java-websocket</groupId>
26+
<artifactId>Java-WebSocket</artifactId>
27+
<version>1.3.0</version>
28+
</dependency>-->
29+
</dependencies>
30+
31+
<!-- to build a single jar containing all dependencies run mvn compile assembly:single -->
32+
33+
<build>
34+
<plugins>
35+
<plugin>
36+
<artifactId>maven-assembly-plugin</artifactId>
37+
<configuration>
38+
<descriptorRefs>
39+
<descriptorRef>jar-with-dependencies</descriptorRef>
40+
</descriptorRefs>
41+
</configuration>
42+
</plugin>
43+
</plugins>
44+
</build>
45+
</project>

0 commit comments

Comments
 (0)