Skip to content

Java wrapper for FunPay private api

License

Notifications You must be signed in to change notification settings

panic08/funpay4j

Repository files navigation

FunPay4j Logo

CI GitHub release JitPack Apache License


The funpay4j library is a Java wrapper for FunPay private api

Table of contents

Install

Example for gradle:

repositories {
    maven {
        url 'https://jitpack.io'
    }
}

dependencies {
    implementation 'com.github.panic08:funpay4j:1.0.4'
}

Example for maven:

<repositories>
    <repository>
        <id>jitpack</id>
        <url>https://jitpack.io</url>
    </repository>
</repositories>

<dependencies>
<dependency>
    <groupId>com.github.panic08</groupId>
    <artifactId>funpay4j</artifactId>
    <version>1.0.4</version>
</dependency>
</dependencies>

Requirements

This project depends on

  • Java 8+
  • Jsoup
  • OkHttpClient
  • Gson
  • ProjectLombok

Overview

This Java library allows you to interact with the FunPay. Most of the functionality that is present on the site is here

Usage

Terms and Conditions

This library is for personal use and for educational purposes due to the fact that there is no official FunPay api at this time

  • Please, do not use this library to spam (botting, spam messaging, etc...)
  • Use reasonable (human) delay in between sending requests

Contributors are not responsible for usage and maintainability. Due to the nature of this project, some features of the library are not guaranteed as they make change and break in the future. This library is licensed under ASL

Quick Usage

Create FunPayExecutor

Basic creation of FunPayExecutor

Example:

FunPayExecutor funPayExecutor = new FunPayExecutor();

Get seller

Basic seller's receipt

Example:

FunPayExecutor funPayExecutor = ...

User user = null;

try {
    user = funPayExecutor.execute(GetUser.builder().userId(1).build());
} catch (FunPayApiException e) {
    throw new RuntimeException(e);
}

Seller seller = null;

if (user instanceof Seller) {
    seller = (Seller) user;
}

Create AuthorizedFunPayExecutor

Basic creation of AuthorizedFunPayExecutor

Example:

AuthorizedFunPayExecutor funPayExecutor = new AuthorizedFunPayExecutor("test-golden-key");

Raise all offers

Basic raising of all offers

Example:

AuthorizedFunPayExecutor funPayExecutor = ...

try {
    funPayExecutor.execute(RaiseAllOffers.builder().gameId(41).lotId(211).build());
} catch (FunPayApiException e) {
    throw new RuntimeException(e);
} catch (OfferAlreadyRaisedException e) {
    System.out.println("The offer has already been raised!!!");
}

Contributing

If you have an addition you would like to make, please do not hesitate to make a pull request!