Download the PHP package kiryi/flaryi without Composer

On this page you can find all versions of the php package kiryi/flaryi. 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 flaryi

Kiryi's FLARYI

A Flarum API client.

Installation

Usage

First available Endpoint and perform a method associated with it. You will get the response from Flarum's API as a return and may use it in your further logic.

Constructor Definition

Parameters

filepath
Optional filepath relative your project's root directory to a custom configuration INI file. If nothing is provided, default (config/flaryi.ini) is used (more information).

Method Definition call

Assigns a variable to the view's data object.

Parameters

endpoint
One of the available Endpoints.

Return Values

Returns the Endpoint you can then perform one of its associated methods.

Initialization

You have to provide the client at least two mandatory parameters you can must define in a custom configuration INI file or use the default one.

apiUrl
The URL of your Flarum's API. Usually it is {YOURFLARUMDOMAIN}/api.

apiKey
A API key from your Flarum installation. Currently you have to manually create a 40 character long random string and put it directly into your Flarum's databse api_keys table key column together with an User ID to the user_id column. The User ID depends on the actions you want to perform. If you want to use every possible API Call, use an Administrator User. If not, you can create a role in your Flarum's administration area with the prefered rights.

Wheter you use a custom or the default file, the contens have to be:

The default filepath is config/flaryi.ini. If you want to use a custom filepath, you have to provide it to the constructor of the client. The path is relative to your project's root directory.

Available Endpoints

The Flarum API provides some Endpoint you can perform several actions on it. FLARYI covering only some Endpoints and each Endpoint only provides some available methods to perform (actions).

Currently available Endpoints:

Example

configuration/config.ini

src/Controller/UserListController.php

will save an object to $userList containing all Users of your Flarum. The User objects containg an ID (always), the requested fields username and email as well as some other information the API provides. Please keep in mind, that not everything can be filtered with an API Call, but you can use the received User list to perform more filtering and e.g. following API Calls like so:

src/Controller/UserGroupController.php

This script


All versions of flaryi with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4
kiryi/pathyi Version ^1.0
kiryi/inyi Version ^1.0
guzzlehttp/guzzle Version ~6.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 kiryi/flaryi contains the following files

Loading the files please wait ....