Download the PHP package xmlsquad/ping-drive without Composer

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

ping-drive

Symfony Console command that reports its attempts at locating and reading the contents of a Google Drive folder or file.

Inspired by the terminal command of the same name: ping

Designed be used in the context of the Symfony Console application at https://github.com/xmlsquad/xml-authoring-tools which, in turn, is used in the context of a known directory structure which is based on xml-authoring-project.

This simple command should be used to test our connection and access to a specific Google Drive entity (file or folder). To that end it should do as little as possible other than provide feedback on its progress.

Requirements

How to get a Google API client secret file

The following installation and usage instructions assume that you have created an O Auth Google API key and stored it locally on your workstation.

  1. Open Google API console.
  2. Create a project or select an existing project.
  3. Enable the following APIs in the project: Drive and Sheets.
  4. Go to the "Credentials" section, "Credentials" tab and create an "OAuth client ID" credential. Or use an existing OAuth credential.
  5. Click the download button (⬇️) at the right of the "OAuth 2.0 client IDs" list.

Installation

Installing as a standalone project

Open a terminal and run:

or

Where <directoryName> is the directory where the command must be installed. In this case the command is started by running:

Further options and arguments are described in the Usage section below.

Installing as a project dependency

Open a terminal, go to the project root directory and run:

In this case the command is started by running:

Usage

The command operates on behalf a Google user. So, you will need to authenticate during, at least, the first run. I say, 'at least' because, if --gApiAccessTokenFile is provided, the authentication token can be stored for following invocations.

To use it, run the command and follow its instructions.

The command signature:

Behaviours

The command prints the URL information:

(See examples of each type with screenshots and the expected output from the command line)

Usage example:

The command exists with status code 0 if the file is accessible and status code 1 if the file is not accessible. So the command can be used in complex bash scripts, for example:

Using with configuration file

The client secret and the access token paths can be read from a configuration file. In this case you don't need to set this options while starting the command.

The configuration file must be named XmlAuthoringProjectSettings.yaml and located in the directory where the command is run or in one of the parent directories. XmlAuthoringProjectSettings.yaml.dist is an example of the configuration file with required parameters.

Troubleshooting

If you have an error message starting with Failed to authenticate to Google: and the rest of the message doesn't give much information, do the following:

  1. Double check to ensure you followed the API Key instructons and are using the correct type of key.
  2. Try to authenticate from scratch by running the command with the --forceAuthenticate option.
  3. If it doesn't help, create a Google API client secret file again and make sure the command uses the new file. You can see what secret file is used by running the command with the -v option.

Contribution

  1. Clone the repository.
  2. Install the dependencies by running composer install in a console.
  3. Make a change. Make sure the code follows the PSR-2 standard.
  4. Test the code by running composer test. If the test fails, fix the code.
  5. Commit and push the changes.

All versions of ping-drive with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1
xmlsquad/xml-authoring-library Version 0.3.3
symfony/console Version ^3.4
symfony/yaml Version ^3.4
symfony/filesystem Version ^3.4
google/apiclient Version ^2.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 xmlsquad/ping-drive contains the following files

Loading the files please wait ....