Download the PHP package vaneves/apirus without Composer

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

Apirus - Doc Generator

Apirus

PHP application to create beautiful rest API documentation using markdown. Inspired by readme.com.

Installation

To install, run the command:

After downloading, go to the application directory and copy the .env.example file as .env.

Building

To compile the HTML output, just run the following command:

.env Configuration

You can configure settings to compile the API, to do so just edit the .env file and change the value of the variables.

Variable Description Default
API_URL Base URL of requests
SOURCE Path the markdown files ./docs
DIST Destination folder ./public
THEME Theme name ./themes/default
HIGHTLIGHT Highlight style dark

The API_URL variable is used to not repeat the complete URL of the request in all markdown files. You can use it {{API_URL}}, for example:

request:cURL curl --location --request GET '{{API_URL}}/api/items' \ --header 'Content-Type: application/json'

Optional Arguments

You can enter arguments for changing the build. The accepted arguments are:

Argument Short Description Default
help Prints a usage statement
watch Watching files changes
src s Path the markdown files SOURCE
dist d Destination folder DIST
theme t Theme name THEME
highlight h Highlight style HIGHTLIGHT

Example:

If an argument is defined when compiling, it will overwrite the values defined in .env.

Watching Files

In development environment you can use the --watch argument so that Apirus can see the directory where the markdown files are, as soon as there is a change (create, change or delete), it will automatically rebuild. For example:

You can pass other arguments as usual, for example:

Creating Documentation

By default, the directory where the markdown files are located is in docs. But you can change. Within that directory you must create other directories, where each one will correspond to an item in the menu, for example:

The directory name will be used for the menu section title. But the numbering will be removed, as it is only used for ordering. For example 00 - Getting started will generate the titleGetting started.

In the directories you will create a file for each section. The file name is ignored if it has the title meta inside it. But if you don't have the title meta, the file name will be used in the menu. For example, 01 - Another section.md will have the item in theAnother section menu.

Meta

"Meta" are used to build a section of your documentation. It is optional to inform the meta, but if defined, it must be of the following structure:

As I said, all are optional. If you leave the title blank, the file name without the format and initial numbering (used for sorting) will be used. If you leave the method orurl blank, this information will not be rendered.

The "meta" must be entered at the beginning of the file.

Requests

You can define several examples of requests, in several languages. It is somewhat similar to the code block, but we use the word request and in front of it the name of the language. For example:

request:cURL curl --location --request GET 'http://example.com/api/items' \ --header 'Content-Type: application/json' `

request:Python import requests url = "http://example.com/api/items" headers = { 'Content-Type': 'application/json' } response = requests.request("GET", url, headers=headers) print(response.text.encode('utf8')) `

Each language block will be a tab with an example request on the interface. You can place a request block anywhere in the file.

Reponses

You can define examples of request responses. It is similar to a block of code, but this time you enter the HTTP code of the response. For example:

response:200 [{ "id": 1, "name": "example 1" }, { "id": 2, "name": "example 2" }, { "id": 3, "name": "example 3" }] `

response:401 { "error": "Invalid token" } `

Each block will be a tab with a response example. You can place a response block anywhere in the file.

Description

Any information other than the meta, requisition block or return block, will be part of the section description. You can use any markdown markup as per the Parsedown library.


All versions of apirus with dependencies

PHP Build Version
Package Version
Requires erusev/parsedown Version ^1.7
symfony/yaml Version ^5.0
league/climate Version ^3.5
scrivo/highlight.php Version v9.18.1.1
symfony/dotenv Version ^5.0
vaneves/tosko Version ^0.0.4
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 vaneves/apirus contains the following files

Loading the files please wait ....