Download the PHP package nahid/php-stack-api without Composer

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

php-stack-api

php-stack-api is a php SDK for StackExchange api version 2.2. Now you can easily access and hanlde all of StackApps Apis. Lets enjoy :)

Requirements

Installation

To install this package with your project, just run this command in your terminal from project root.

Configurations

After installation complete successfully, you have to configure it correctly. This package is also Laravel compatible.

Laravel

Open config/app.php and add this line end of the providers array

and then run this command in your terminal to publish config file

When you run this command stackapi.php config file will be copy config directory of your project. Now open app/stackapi.php and file the credentials with your StackApps application.

Pure PHP Project

There are no special configuration for pure PHP project. You have to pass configuration data when the class is instantiated.

Usage

Its has a lots of functionalities. When all of these are configured, you just use it like what you what.

At first you need to authenticate an user with your project. So make a authentication link.

Its make a authentication url for StackExchange and get access_token with your redirect_url. Now you are an authorized user and access all API from this package.

Get Currently Authenticated Users Data

API URI: /me

For Laravel

Pure PHP

Users Information By User ID

API URI: /users/{ids}

For Laravel

Pure PHP

Here all of these data are Objects. So you can easily handle it.

The Easy Way

This package is well formatted as like as RestAPI URI. Really you amazed to see it.

For example, you want to get data where URI is /users/{ids}/comments so the method will look like these

Or, if the URI is /users/{id}/network-activity so the method will be

Note: 1. every URI you can call as PHP method chaining as per URI format.

  1. If you have a hyphen (-) separated URI, it will transform to camel case(camelCase) when you called as a method
  2. Every URI parameter goes to method parameter as per URI format.

Here the final example, if you have a URI like /badges/{ids}/recipients

Available Methods

For more about StackApps API you can read documentation

Thank you :)


All versions of php-stack-api with dependencies

PHP Build Version
Package Version
Requires illuminate/config Version ^5.2
duncan3dc/sessions Version ^1.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 nahid/php-stack-api contains the following files

Loading the files please wait ....