2017 © Pedro Peláez
 

library fortnite-php

PHP wrapper for the official Fortnite API.

image

tustin/fortnite-php

PHP wrapper for the official Fortnite API.

  • Monday, July 30, 2018
  • by Tustin
  • Repository
  • 11 Watchers
  • 43 Stars
  • 566 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 14 Forks
  • 8 Open issues
  • 8 Versions
  • 30 % Grown

The README.md

Fortnite-PHP Wrapper

Interact with the official Fortnite API using PHP., (*1)

Packagist Packagist, (*2)

Installation

Pull in the project using composer: composer require Tustin/fortnite-php, (*3)

Usage

Create a basic test script to ensure everything was installed properly, (*4)

<?php

require_once 'vendor/autoload.php';

use Fortnite\Auth;
use Fortnite\Account;
use Fortnite\Mode;
use Fortnite\Language;
use Fortnite\Platform;

// Authenticate
$auth = Auth::login('epic_email@domain.com','password');

// Output each stat for all applicable platforms
var_dump($auth->profile->stats);

// Grab someone's stats
$sandy = $auth->profile->stats->lookup('sandalzrevenge');
echo 'Sandy Ravage has won ' . $sandy->pc->solo->wins . ' solo games and ' . $sandy->pc->squad->wins . ' squad games!';

Get Leaderboards

$auth = Auth::login('epic_email@domain.com','password');
var_dump($auth->leaderboard->get(Platform::PC, Mode::DUO)); 

Get News

$auth = Auth::login('epic_email@domain.com','password');
var_dump($auth->news->get(News::BATTLEROYALE, Language::ENGLISH)); 

Get Store

$auth = Auth::login('epic_email@domain.com','password');
var_dump($auth->store->get(Language::ENGLISH)); 

Get Challenges

$auth = Auth::login('epic_email@domain.com','password');
// All weekly challenges
var_dump($auth->profile->challenges->getWeeklys()); 

// Or just get a specific week (in this example, week 1)
var_dump($auth->profile->challenges->getWeekly(1)); 

Constants

Platform [ PC, PS4, XB1 ]

Mode [ SOLO, DUO, SQUAD ]

Language [ ENGLISH, GERMAN, SPANISH, CHINESE, FRENCH, ITALIAN, JAPANESE ]

News [ BATTLEROYALE, SAVETHEWORLD ]

Contributing

Fortnite now utilizes SSL certificate pinning in their Windows client in newer versions. I suggest using the iOS mobile app to do any future API reversing as both cheat protections on the Windows client make it difficult to remove the certificate pinning. If SSL certificate pinning is added to the iOS version, I could easily provide a patch to remove that as the iOS version doesn't contain any anti-cheat., (*5)

The Versions

30/07 2018

dev-master

9999999-dev https://github.com/Tustin/fortnite-php

PHP wrapper for the official Fortnite API.

  Sources   Download

MIT

The Requires

 

api php fortnite

30/07 2018

0.0.7

0.0.7.0 https://github.com/Tustin/fortnite-php

PHP wrapper for the official Fortnite API.

  Sources   Download

MIT

The Requires

 

api php fortnite

09/05 2018

0.0.6

0.0.6.0 https://github.com/Tustin/fortnite-php

PHP wrapper for the official Fortnite API.

  Sources   Download

MIT

The Requires

 

api php fortnite

08/05 2018

0.0.5

0.0.5.0 https://github.com/Tustin/fortnite-php

PHP wrapper for the official Fortnite API.

  Sources   Download

MIT

The Requires

 

api php fortnite

26/02 2018

0.0.4

0.0.4.0

  Sources   Download

MIT

The Requires

 

25/02 2018

0.0.3

0.0.3.0

  Sources   Download

MIT

The Requires

 

22/02 2018

0.0.2

0.0.2.0

  Sources   Download

MIT

The Requires

 

18/02 2018

0.0.1

0.0.1.0

  Sources   Download

MIT

The Requires