Giter Club home page Giter Club logo

api's Introduction

SimplifiedApi

Support Server Invite GitHub Issues GitHub Pull Requests GitHub Last Commit

The SimplifiedApi is a fast, powerful, utility library that provides quick and easy Java development for the official Hypixel SkyBlock API.

โšก Quick Example

In this example, we initiate a default SQL database session, pull a filtered collection of ItemModels, and pull the profile of CraftedFury from the Hypixel SkyBlock API.

public class ExampleApp {
    public static void main(String[] args) {
        // Create a Session
        SimplifiedApi.getSessionManager().connect(SqlConfig.defaultSql());

        // Query Session Repository
        ConcurrentList<ItemModel> campfireTalismans = SimplifiedApi.getRepositoryOf(ItemModel.class)
            .stream()
            .filter(itemModel -> itemModel.getKey().startsWith("CAMPFIRE_TALISMAN"))
            .collect(Concurrent.toList());

        // Retrieve Request Proxy
        HypixelSkyBlockRequest hypixelSkyBlockRequest = SimplifiedApi.getWebApi(HypixelSkyBlockRequest.class);

        // Query Hypixel API
        UUID craftedFuryUUID = "f33f51a7-9691-4076-abda-f66e3d047a71";
        SkyBlockProfilesResponse profiles = hypixelSkyBlockRequest.getProfiles(craftedFuryUUID);

        // Get Selected Island
        SkyBlockIsland island = profiles.getSelected();
        
        // Get Enhanced Island (Database Features, Requires Active Session)
        EnhancedSkyBlockIsland enhancedIsland = island.asEnhanced();
    }
}

Make sure you have defined the following environment variables:

DATABASE_HOST, DATABASE_SCHEMA, DATABASE_PORT, DATABASE_USER, DATABASE_PASSWORD

๐Ÿ”— Quick Links

ย  Features

  • Reflection - Helper class and methods to introspect classes, methods and fields. Includes a fast, efficient class file locator, type-matched methods/constructors, accessor caching, superclass getters, and more.
  • Minecraft
    • NbtFactory - Efficient reading and writing of NBT data structures, independent of the Minecraft client source code.
    • Ping - Ping Minecraft servers and get the server information.
    • Generators - Generate 1.8.9-identical Chat and Lore, Textured Skulls, Recipes, and more.
  • Math Evaluation - Evaluate mathematical expressions, includes variable support and many math functions.
  • YAML Config - Easily build your own YAML file storage by extending a class with YamlConfig.
  • Hibernate - SQL domain model persistence, query the persistence cache via the above quick example, and much more.
  • Feign HTTP Proxies - Use and build HTTP proxies to quickly access Web API's.
  • Managers
    • Service Manager - Retrieve a built service using the associated class file.
    • Builder Manager - Retrieve a builder class using the associated class file.
    • Key Manager - Retrieve a key using the associated name.
  • Utilities
    • Builder - Simple helper classes to assist with class/method building using Reflection.
    • Collections
      • Concurrency - Fast and efficient cross-thread-safe collection classes, including Collection, Deque, List, Map, Queue and Set.
      • Search - Quickly search/match Collections/Lists for 1+ objects using method references.
      • Graph - Sort a collection that share the same superclass topologically, this is used for efficient Hibernate loading.
    • Helpers - Classes to help you with reading and manipulating java types and resources.
    • Streams
      • PairStream - Custom stream wrapper for Maps that converts Stream<Map.Entry<K, V>> to PairStream<K, V>. AtomicMap and its inheritors all implement this, allowing you to interact using only K/V on top of Map.Entry<K, V>.
      • TripleStream - Custom stream wrapper for Collections that converts Stream<T> to TripleStream<T, M, R>. AtomicCollection and its inheritors all implement this as an indexed stream, allowing you to know the position of each element and the size of the stream.
    • Other - CommandLine, Mutables, Tuples (Pair/Triple), GSON adapters, etc.

๐Ÿ“ฆ Standalone Installation

WIP

ย  Docker Installation

WIP

Old Instructions

  • Docker
    • docker pull mysql:latest
    • docker run -p 3306:3306 --name sbs-mysql -e MYSQL_ROOT_PASSWORD={{ROOT PASSWORD}} -d mysql
  • Container
    • mysql -uroot -p{{ROOT_PASSWORD}}
      • create user 'sbsadmin'@'%' identified by '{{ROOT_PASSWORD}}';
      • flush privileges;
      • create database skyblocksimplified;
      • grant all privileges on skyblocksimplified.* to 'sbsadmin'@'%';

api's People

Contributors

craftedfury avatar crazyhjonk avatar thenewjavaman avatar

Watchers

 avatar  avatar  avatar

api's Issues

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.