Skip to content

Commit

Permalink
1.6.0 (#27)
Browse files Browse the repository at this point in the history
* Updating dependencies.
* Rearrange Creatures Damage Modifiers. Format empty Loot Table in a more sensible manner.
* Make sure actualname of achievements is not erased.
* Adding booktypes.
* Changing effectid to list.
* Adding cities to enum and parameter to mount.
* Updating to java 12 and maven.
* Dynamically determine host for swagger.
* Swagger documentation.
* Expand unit tests and integration tests.
* Update README.
  • Loading branch information
benjaminkomen authored Jun 8, 2019
1 parent 282c391 commit 0763e66
Show file tree
Hide file tree
Showing 50 changed files with 1,396 additions and 181 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@ hs_err_pid*
target/
!maven-wrapper.properties
!maven-wrapper.jar
!system.properties
!system.properties
!src/test/resources/credentials.properties
2 changes: 1 addition & 1 deletion .mvn/wrapper/maven-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.5.3/apache-maven-3.5.3-bin.zip
distributionUrl=http://mirror.novg.net/apache/maven/maven-3/3.6.1/binaries/apache-maven-3.6.1-bin.zip
5 changes: 2 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
language: java

jdk:
- openjdk11

- openjdk12

addons:
sonarcloud:
Expand All @@ -14,4 +13,4 @@ cache:
- '$HOME/.sonar/cache'

script:
- ./mvnw clean org.jacoco:jacoco-maven-plugin:prepare-agent install sonar:sonar -Djava.version=8
- ./mvnw clean org.jacoco:jacoco-maven-plugin:prepare-agent install sonar:sonar
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2018 Benjamin Komen
Copyright (c) 2019 Benjamin Komen

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
80 changes: 40 additions & 40 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,159 +10,159 @@ Gets data from http://tibia.wikia.com and exposes this data using a RESTful JSON
Clone this git project to your local computer and compile it using: `mvn clean install` from your favourite command line
environment such as Git Bash. Now you can start the application by typing the following in your command line:
`java -jar target/TibiaWikiApi-1.0.0-SNAPSHOT.jar` while the current directory is the home folder of the project.
This process was tested with Maven 3.5.3 and Java 11
This process was tested with Maven 3.6.1 and Java 12.

Alternatively and maybe easier, you can also execute: `mvn spring-boot:run` in your command line.

You can now access the REST resources using your browser or any REST client such as Postman or curl from your command line.
E.g. navigating to http://localhost:8080/api/corpses should give you a list of corpses.
E.g. navigating to https://tibiawikiapi.herokuapp.com/api/corpses should give you a list of corpses.

## API documentation
Navigate to http://localhost:8080/ for automatically generated api documentation provided by Swagger.
Navigate to https://tibiawikiapi.herokuapp.com/ for Swagger API documentation.

## Query parameters
For all resources the query parameter ?expand=true can be appended to get a full list of JSON objects at the collection resource level. For example, instead of http://localhost:8080/achievements the url http://localhost:8080/achievements?expand=true should be used.
For all resources the query parameter ?expand=true can be appended to get a full list of JSON objects at the collection resource level. For example, instead of https://tibiawikiapi.herokuapp.com/achievements the url https://tibiawikiapi.herokuapp.com/achievements?expand=true should be used.

## Achievements

A list of all achievements:
http://localhost:8080/api/achievements
https://tibiawikiapi.herokuapp.com/api/achievements

An achievement by achievement name, e.g. "Goo Goo Dancer":
http://localhost:8080/api/achievements/Goo_Goo_Dancer
https://tibiawikiapi.herokuapp.com/api/achievements/Goo_Goo_Dancer

## Books

A list of all books:
http://localhost:8080/api/books
https://tibiawikiapi.herokuapp.com/api/books

A book by book name, e.g. "Dungeon Survival Guide (Book)":
http://localhost:8080/api/books/Dungeon_Survival_Guide_%28Book%29
https://tibiawikiapi.herokuapp.com/api/books/Dungeon_Survival_Guide_%28Book%29

## Buildings

A list of all buildings:
http://localhost:8080/api/buildings
https://tibiawikiapi.herokuapp.com/api/buildings

A building by building name, e.g. "Theater Avenue 8b":
http://localhost:8080/api/buildings/Theater_Avenue_8b
https://tibiawikiapi.herokuapp.com/api/buildings/Theater_Avenue_8b

## Corpses

A list of all corpses:
http://localhost:8080/api/corpses
https://tibiawikiapi.herokuapp.com/api/corpses

A corpse by corpse name, e.g. "Dead Rat":
http://localhost:8080/api/corpses/Dead_Rat
https://tibiawikiapi.herokuapp.com/api/corpses/Dead_Rat

## Creatures

A list of all creatures:
http://localhost:8080/api/creatures
https://tibiawikiapi.herokuapp.com/api/creatures

A creature by creature name, e.g. "Dragon":
http://localhost:8080/api/creatures/Dragon
https://tibiawikiapi.herokuapp.com/api/creatures/Dragon

## Effects

A list of all effects:
http://localhost:8080/api/effects
https://tibiawikiapi.herokuapp.com/api/effects

An effect by effect name, e.g. "Blue Electricity Effect":
http://localhost:8080/api/effects/Blue_Electricity_Effect
https://tibiawikiapi.herokuapp.com/api/effects/Blue_Electricity_Effect

## Hunting Places

A list of all hunting places:
http://localhost:8080/api/huntingplaces
https://tibiawikiapi.herokuapp.com/api/huntingplaces

A location by location name, e.g. "Hero Cave":
http://localhost:8080/api/huntingplaces/Hero_Cave
https://tibiawikiapi.herokuapp.com/api/huntingplaces/Hero_Cave

## Items

A list of all items:
http://localhost:8080/api/items
https://tibiawikiapi.herokuapp.com/api/items

An item by item name, e.g. "Carlin Sword":
http://localhost:8080/api/items/Carlin_Sword
https://tibiawikiapi.herokuapp.com/api/items/Carlin_Sword

## Keys

A list of all keys:
http://localhost:8080/api/keys
https://tibiawikiapi.herokuapp.com/api/keys

A key by key name (not only the number but the full wiki pagename), e.g. "Key 4055":
http://localhost:8080/api/keys/Key_4055
https://tibiawikiapi.herokuapp.com/api/keys/Key_4055

## Locations (Geography)

A list of all locations:
http://localhost:8080/api/locations
https://tibiawikiapi.herokuapp.com/api/locations

A location by location name, e.g. "Thais":
http://localhost:8080/api/locations/Thais
https://tibiawikiapi.herokuapp.com/api/locations/Thais

## Missiles

A list of all missiles:
http://localhost:8080/api/missiles
https://tibiawikiapi.herokuapp.com/api/missiles

A missile by name, e.g. "Throwing Cake Missile":
http://localhost:8080/api/missiles/Throwing_Cake_Missile
https://tibiawikiapi.herokuapp.com/api/missiles/Throwing_Cake_Missile

## Mounts

A list of all mounts:
http://localhost:8080/api/mounts
https://tibiawikiapi.herokuapp.com/api/mounts

A mount by mount name, e.g. "Donkey":
http://localhost:8080/api/mounts/Donkey
https://tibiawikiapi.herokuapp.com/api/mounts/Donkey

## NPCs

A list of all NPCs:
http://localhost:8080/api/npcs
https://tibiawikiapi.herokuapp.com/api/npcs

An NPC by NPC name, e.g. "Sam":
http://localhost:8080/api/npcs/Sam
https://tibiawikiapi.herokuapp.com/api/npcs/Sam

## Objects

A list of all objects:
http://localhost:8080/api/objects
https://tibiawikiapi.herokuapp.com/api/objects

An object by object name, e.g. "Blueberry Bush":
http://localhost:8080/api/objects/Blueberry_Bush
https://tibiawikiapi.herokuapp.com/api/objects/Blueberry_Bush

## Outfits

A list of all outfits:
http://localhost:8080/api/outfits
https://tibiawikiapi.herokuapp.com/api/outfits

An outfit by outfit name, e.g. "Pirate Outfits":
http://localhost:8080/api/outfits/Pirate_Outfits
https://tibiawikiapi.herokuapp.com/api/outfits/Pirate_Outfits

## Quests

A list of all quests:
http://localhost:8080/api/quests
https://tibiawikiapi.herokuapp.com/api/quests

A quest by quest name, e.g. "The Paradox Tower Quest":
http://localhost:8080/api/quests/The_Paradox_Tower_Quest
https://tibiawikiapi.herokuapp.com/api/quests/The_Paradox_Tower_Quest

## Spells

A list of all spells:
http://localhost:8080/api/spells
https://tibiawikiapi.herokuapp.com/api/spells

A spell by spell name, e.g. "Light Healing":
http://localhost:8080/api/spells/Light_Healing
https://tibiawikiapi.herokuapp.com/api/spells/Light_Healing

## Streets

A list of all streets:
http://localhost:8080/api/streets
https://tibiawikiapi.herokuapp.com/api/streets

A street by street name, e.g. "Sugar Street":
http://localhost:8080/api/streets/Sugar_Street
https://tibiawikiapi.herokuapp.com/api/streets/Sugar_Street
47 changes: 16 additions & 31 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,39 +4,39 @@

<groupId>com.tibiawiki</groupId>
<artifactId>TibiaWikiApi</artifactId>
<version>1.5.0</version>
<version>1.6.0</version>
<packaging>jar</packaging>
<name>TibiaWikiApi</name>
<url>https://github.com/benjaminkomen/TibiaWikiApi</url>

<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.2.RELEASE</version>
<version>2.1.5.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<slf4j.version>1.8.0-beta2</slf4j.version>
<slf4j.version>1.8.0-beta4</slf4j.version>
<json.version>20180813</json.version>
<lombok.version>1.18.4</lombok.version>
<jetbrains.version>16.0.3</jetbrains.version>
<lombok.version>1.18.8</lombok.version>
<jetbrains.version>17.0.0</jetbrains.version>
<streamex.version>0.6.8</streamex.version>
<junit.jupiter.version>5.3.2</junit.jupiter.version>
<mockito.version>2.23.4</mockito.version>
<junit.jupiter.version>5.4.2</junit.jupiter.version>
<mockito.version>2.27.0</mockito.version>
<hamcrest.version>1.3</hamcrest.version>
<maven.surefire.plugin.version>2.22.1</maven.surefire.plugin.version>
<maven.failsafe.plugin.version>2.22.1</maven.failsafe.plugin.version>
<maven.compiler.plugin.version>3.8.0</maven.compiler.plugin.version>
<maven.surefire.plugin.version>2.22.2</maven.surefire.plugin.version>
<maven.failsafe.plugin.version>2.22.2</maven.failsafe.plugin.version>
<maven.compiler.plugin.version>3.8.1</maven.compiler.plugin.version>
<build.helper.maven.plugin.version>3.0.0</build.helper.maven.plugin.version>
<jwiki.version>2.0.1</jwiki.version>
<guava.version>27.0.1-jre</guava.version>
<ow2.asm.version>7.0</ow2.asm.version>
<guava.version>27.1-jre</guava.version>
<ow2.asm.version>7.1</ow2.asm.version>
<swagger.jersey2.jaxrs.version>1.5.21</swagger.jersey2.jaxrs.version>
<javax.activation.version>1.1.1</javax.activation.version>
<vavr.version>0.9.2</vavr.version>
<vavr.version>0.10.0</vavr.version>
</properties>

<repositories>
Expand Down Expand Up @@ -162,15 +162,7 @@
<!-- To write unit tests -->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>${junit.jupiter.version}</version>
<scope>test</scope>
</dependency>

<!-- To run unit tests -->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<artifactId>junit-jupiter</artifactId>
<version>${junit.jupiter.version}</version>
<scope>test</scope>
</dependency>
Expand Down Expand Up @@ -225,16 +217,9 @@
<version>${maven.compiler.plugin.version}</version>
<!-- The source and target entries make sure you can run the app from IntelliJ while using java 9+ methods-->
<configuration>
<source>11</source>
<target>11</target>
<source>12</source>
<target>12</target>
</configuration>
<dependencies>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
<version>${ow2.asm.version}</version>
</dependency>
</dependencies>
</plugin>

<plugin>
Expand Down
Loading

0 comments on commit 0763e66

Please sign in to comment.