Git Product home page Git Product logo

tibiawikiapi's Introduction

Build Status Quality Gate Coverage

TibiaWikiApi

Gets data from http://tibia.wikia.com and exposes this data using a RESTful JSON API.

View online

Navigate to https://tibiawiki.dev to view the Swagger API of this project.

Run locally

Clone this git project to your local computer and compile it using: ./gradlew build from your favourite command line terminal. Then execute: ./gradlew bootRun and open your browser on http://localhost:8080

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.

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 https://tibiawiki.dev/api/achievements the url https://tibiawiki.dev/api/achievements?expand=true can be used.

Resources

The following resources are available:

Entity List Example
Achievement achievements Goo Goo Dancer
Books books Dungeon Survival Guide (Book)
Buildings buildings Theater Avenue 8b
Charms charms Adrenaline Burst
Corpses corpses Dead Rat
Creatures creatures Dragon
Effects effects Blue Electricity Effect
Hunting Places hunting places Hero Cave
Items1 items Carlin Sword
Keys keys Key 4055
Locations locations Thais
Loot Statistics loot Ferumbras
Missiles missiles Throwing Cake Missile
Mounts mounts Donkey
NPCs npcs Sam
Objects1 objects Blueberry Bush
Outfits outfits Pirate Outfits
Quests quests The Paradox Tower Quest
Spells spells Light Healing
Streets streets Sugar Street

1 as of 2021 the categories Items and Objects were merged on the wiki. To be backwards compatible with systems relying on an accurate list of Items, this API now returns a list of 'Pickupable Items' from the Items endpoint, but which have the Object templateType.

tibiawikiapi's People

Contributors

benjaminkomen avatar dependabot-preview[bot] avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

tibiawikiapi's Issues

searchable?

if I want to search an item when it contains "sword" keyword, this API has a search method or something related?

Add basic authentication

Allow username + password as basic auth header for logging into the wiki as bot.
This way the TibiaWikiBot coud theoretically use the online tibiawiki.dev implementation to perform updates to wiki articles.

Support Loot Statistics

Endpoints:

  • /api/loot_statistics
  • /api/loot_statistics/{CREATURE_NAME}

E.g. for https://tibia.fandom.com/wiki/Loot_Statistics:Bear

  • Parse page (any page in Category:Loot Statistics), look for the first occurrence of text {{Loot2

Input:

{{Loot2
|version=8.6
|kills=52807
|name=Bear
|Empty, times:24777
|Meat, times:21065
|Ham, times:10581
|Bear Paw, times:1043, amount:1, total:1043
|Honeycomb, times:250, amount:1, total:249
}}

Output:

{
	"version": "8.6",
	"kills": 52807,
	"name": "Bear",
	"loot": [
		{
			"itemName": "Empty",
			"times": 24777
		},
		{
			"itemName": "Meat",
			"times": 21065
		},
		{
			"itemName": "Ham",
			"times": 10581
		},
		{
			"itemName": "Bear Paw",
			"times": 1043,
			"amount": 1,
			"total": 1043
		},
		{
			"itemName": "Honeycomb",
			"times": 250,
			"amount": 1,
			"total": 249
		}
	]
}

Add caching

Probably automatically purge every hour and a query parameter to purge it manually.

Rewrite to Kotlin

  • add correct dependencies/changes to build.gradle
  • rewrite part of the code and see if it still works
  • start rewriting module by module (use 'ports and adapters' architecture)

Fix MediaWiki login

Recently Wikia upgraded (finally) from mediawiki 1.19 to 1.33 or so. This changes the login system, possibly back to how fastily/jwiki works.

Feature: image of item, creature etc.

Hey, so far i'm loving the API. Easy and simple to use, but it's missing one feature.
I'm not an expert but as far as it's possible would be great if you add the image URL in responses on the creatures and items etc. Would be really usefull

Retrieving more than 500 results

When not logged in, a maximum of 500 results per call are retrieved. This is most easily mitigated by logging in, than the limit is 5000 results, which is enough for most purposes (the longest list of articles is items, less than 2000).

Currently when logging in an error is thrown when requesting the token.

Ability to upload data

Add a PUT method to all resources to upload a new wikipage or change an existing wikipage.

Certain checks should be in place to ensure the validity of the posted data.

Support every infobox flavor

There are currently 21 different infobox flavors, as listed here. Seventeen of them are deemed relevant to expose in this API. The progress of supporting them is listed here.

  • Achievement
  • Book
  • Building
  • Corpse
  • Creature
  • Effect
  • Geography
  • Hunt (#5 )
  • Item (#6 )
  • Key (#7 )
  • Mount (#8 )
  • NPC (#9 )
  • Object (#10 )
  • Outfit (#11 )
  • Quest (#12 )
  • Spell (#13 )
  • Street (#14 )

Swagger UI https

Swagger UI only works properly if https is requested from the javascript I think. Enforce this.

Pull request are automatically deployed on GCP

PRs cause a trigger to build a new container, but also to deploy it to 'production' on GCP. Proposed solutions:

  • use a different cloudbuild.yaml for PRs, which only builds the docker image, not deploy it.

What about transcripts?

I was looking what you have done here and its simply amazing, also I was trying to get some more information of Npcs but there was no Transcripts for them.
Is it a future feature?
Thanks for reading this.

Use jwiki instead of jwbf

One reason to switch is the ability to use a faster method to get all page contents from a category.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.