|Classes of Nahid Bin Azhar||PHP StackExchange API||README.md||Download|
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 :)
To install this package with your project, just run this command in your terminal from project root.
After installation complete successfully, you have to configure it correctly. This package is also Laravel compatible.
and then run this command in your terminal to publish config file
When you run this command
Pure PHP Project
There are no special configuration for pure PHP project. You have to pass configuration data when the class is instantiated.
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
Get Currently Authenticated Users Data
Users Information By User ID
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
Or, if the URI is
> Note: 1. every URI you can call as PHP method chaining as per URI format. > 2. If you have a hyphen (-) separated URI, it will transform to camel case(camelCase) when you called as a method > 3. Every URI parameter goes to method parameter as per URI format.
Here the final example, if you have a URI like
For more about StackApps API you can read documentation
Thank you :)