Download the PHP package 1000nettles/factom-api-php without Composer

On this page you can find all versions of the php package 1000nettles/factom-api-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 factom-api-php

factom-api-php

A Simple PHP Wrapper for any Factom API v2 calls (including calls to factomd and factom-walletd)

Find the Factom API reference documentation here: https://docs.factom.com/api

Installation

Using Composer:

composer require 1000nettles/factom-api-php

Normal Require:

How To Use

Launch any Factom Command-Line Apps

The PHP Factom API integration connects to a locally running instance of factomd or factom-walletd. When you run these locally or on your server, they run as service which lets you connect usually through http://localhost:8088 (factomd) or http://localhost:8089 (factom-walletd). You can find out more about running these services here - https://docs.factom.com/cli

For factomd, you may be able to connect to "courtesy nodes" instead such as http://courtesy-node.factom.com, however these are not guaranteed. I have not tested if there are API limits. For more information: https://docs.factom.com/#run-enterprise-wallet-online

Instantiate the Factom API Adapter

Notice we are supplying the full URL to version 2 of the API below.

If you want to interact with the API securely, make sure you're running factomd with TLS mode ON - ./factomd -tls true. You also should pass in the location to your certificate when instantiating the adapter, and change the URL to HTTPS:

If you want to interact with the API with a username and password, make sure you're running factomd with a username and password defined - ./factomd -rpcuser <username> -rpcpass <password>. You can run this with a certificate as well if you wish.

Run the API Method With Your Parameters!

API methods are outlined here: https://docs.factom.com/api

Firing GET Requests

Certain API methods use the GET method rather than POST. For example, the 'address' method within factom-walletd: https://docs.factom.com/api#address. You can run this easily:

That's all there is to it. If you are getting cURL issues, it may be because you do not have the PHP cURL lib installed.

Tests

Sorry! None right now.

Known Issues


All versions of factom-api-php with dependencies

PHP Build Version
Package Version
Requires php Version ^5.3.3 || ^7.0
ext-curl Version *
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 1000nettles/factom-api-php contains the following files

Loading the files please wait ....