Download the PHP package xivapi/companion-php without Composer

On this page you can find all versions of the php package xivapi/companion-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package companion-php

Deprecated

Companion PHP

A library for interacting with the FFXIV Companion App API

To learn more about the FFXIV Companion App, read the Research Doc.

If you cannot use PHP

XIVAPI provides endpoints that can give you a companion token with your own account and even let you query the market board. It provides both automated login or providing the SE Official Login. This is useful if you want to use your own account but only know frontend dev (eg: JavaScript), or you're building an Electron app.

If you'd like to try this, please message Vekien#3458 on discord for endpoint information.

Terminology:

Library Documentation


Character Select Process

In order to use the Sight API you need a valid character with an active Subscription (it cannot be in the free trial period). A character does not need to be at any "stage" in the game, a brand new-never logged into character will have full market board access the moment you enter a name and click "create".

Selecting a character

To access the market we first need to select our character and this requires knowing the unique "Character ID". We can find this by listing out our characters:

Characters have a unique Character ID property known as: cid. This ID is not the one you see on Lodestone or anything you'll be familiar with, once you find the character you want take its cid over to the loginCharacter function, for example:

This will confirm with Sight that you want to use this character, you can confirm yourself by performing the following optional code:

Now that we've told it what character to use, we have to confirm its worlds status. This is a new addition in Patch 4.4 and I believe it will be used for when World Visit system is in place. For now it is a requirement and returns the current world and your home world:

Once you have done this, you can now access the market board as well as any other Sight endpoint! You can find all API calls below.

Async Requests

The library supports async requests for all main data actions (not Account or Login actions). This allows you to query multiple endpoints at the same time.

When you enable async it will by pass the "garauntee response" feature. The Sight API doesn't provide data in the first request, instead it will take your request and queue it up, you then need to perform the same request again to get the response. Usually a Sight request will fulfill within 3 seconds, so you could 20 concurrent requests, wait 3 seconds and then perform the same 20 concurrent requests again using the same Request ID to get your response.

You can view an example of Async usage in bin/cli_async

API

Account

AddressBook

ChatRoom

Item

Login

Market

$api->market()->getItemMarketListings(int $itemId)

Get the current Market Prices for an item. The item id must be the in-game dat value which is an integer, not the one on Lodestone.

$api->market()->getTransactionHistory(int $itemId)

Get the current Market History for an item. The item id must be the in-game dat value which is an integer, not the one on Lodestone. The maximum returned history is currently 20, this cannot be changed.

$api->market()->getMarketListingsByCategory(int $categoryId)

Get the current stock listings for a market category

Payments

Reports

Schedule

Testing


Library by: Josh Freeman (Vekien on Discord: (XIVAPI) https://discord.gg/MFFVHWC)

License is MIT, do whatever you want with it :)


All versions of companion-php with dependencies

PHP Build Version
Package Version
Requires guzzlehttp/guzzle Version ~6.0
ramsey/uuid Version ^3.8
phpseclib/phpseclib Version ^2.0
rct567/dom-query Version ^0.8.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package xivapi/companion-php contains the following files

Loading the files please wait ....