Jakcodex / Realmeye API
NodeJS library for parsing Realmeye data for various endpoints.
Can be used as a library in NodeJS or ran as a REST API web app.
Requirements
- NodeJS
- NPM
- Yarn (optional but nice)
Current Features
- Player summary and character lookup
- Top characters by class
- Recent deaths with all options
Development
This is a work in progress and will likely contain bugs. Please report any that you find.
Installation
- Extract package contents.
- Install dependencies with npm.
npm install
Using RealmEye-API
Node Module
const reapi = require('./vendor/reapi.js');
reapi.get.player('MyIGN', function(result) {
console.log(result);
});
REST API
- By default the web server runs on port 3000.
- You can change this to 80 if desired to serve requests directly.
- For added security you can run Apache w/ rewrite rules and ProxyPass over top.
- Start the web server with:
npm start // or node server.js
- See package.json if you need to change the path to node.exe.
- Make requests to the API.
curl http://localhost:3000/api/player/MyIGN
REST API Reference - Available Endpoints
GET /api/player/:username
Returns an object containing found player data for the specified user if any.
POST /api/player/:username
Same as GET but accepts the following POST parameters:
condensed
- Do not include full equipment and skin data
GET /api/class/:class[/:page]
Returns an object containing the top players from the specified class. If a page number is provided it will be displayed instead of page 1.
POST /api/class/:class[/:page]
Same as GET but accepts the following POST parameters:
condensed
- Do not include full equipment and skin datanoPrivate
- Do not include private characters
GET /api/recentdeaths[/:page]
Returns an object containing the most recent deaths in the game. If a page number is provided it will be displayed instead of page 1.
POST /api/recentdeaths
Same as GET but accepts the following POST parameters:
bf
- Base Fame (valid: 0, 20, 150, 400, 800, 2000)ms
- Maxed Stats (valid: 0, 1, 2, 3, 4, 5, 6, 7, 8)page
- Specify a page numbernoPrivate
- Do not include private characterscondensed
- Do not include full equipment and skin data
Privacy Policy
You can read more at the Privacy Policy page.
Jakcodex / Realmeye API License
Copyright 2018 Jakcodex
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
-
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
-
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
-
Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.