Download the PHP package kly-infeed/gam without Composer
On this page you can find all versions of the php package kly-infeed/gam. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package gam
InFeed - Google AdManager
Installation
To get started, install Infeed Google AdManager via the Composer package manager: Add Infeed Google AdManager to your composer.json file.
Or with composer command:
Add provider to your app/config/app.php providers
Publish config
Add alias to app/config/app.php aliases
Configuration
Before using Infeed Google AdManager, you will also need to add credentials for the OAuth services your application utilizes. These credentials should be placed in your config/infeed_gam.php configuration file, and should use the client_id, client_secret, redirect on the providers your application requires. For example:
Routing
Next, you are ready to authenticate app! You will need two routes: one for redirecting the user to the OAuth provider, and another for receiving the callback from Infeed Google AdManager after authentication. We will access Infeed Google AdManager using the GAM facade:
The redirect method takes care of sending the user to the OAuth provider, while the user method will read the incoming request and retrieve the user's information from Infeed Google AdManager.
You will need to define routes to your controller methods:
Response Request Access Token
When you get an access token, you should save it in the config/infeed_gam.php configuration file, because it avoids asking token access requests too often. By default Access token will expire in a year, but in our system will automatically refresh the token
RESTfulness
The Infeed API follows the more standard REST convention of utilizing the HTTP response codes to identify the status of the response. These include, but are not limited to:
- 200 - SUCCESS
- 400 - INVALID
- 403 - FORBIDDEN
- 404 - NOT FOUND
- 500 - INTERNAL ERROR
GET requests will return data, POST requests are for creation, PATCH requests are for modification and DELETE requests are for removal.
Get User
Get current user
Network
Get current network