Download the PHP package yidas/line-notify-sdk without Composer

On this page you can find all versions of the php package yidas/line-notify-sdk. 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 line-notify-sdk

LINE Notify SDK for PHP


LINE Notify SDK for PHP

Latest Stable Version License

OUTLINE


DEMONSTRATION

Sample Codes Site for LINE Notify

As a quick start, use Auth client to create an authorize URL with callback redirectUrl for redirection:

Next, use Auth client to get accessToken on callback URL (redirectUrl.php), then use Notify client to send notifications with accessToken:


REQUIREMENTS

This library requires the following:

Client for LINE Notify

Each LINE Notify service require authentication information for integration, as shown below:

To get a LINE Notify Client:

  1. Register a new LINE Notify service from LINE Notify - Add service with redirectUrl setting.
  2. After registering, get your service's clientId/clientSecret from LINE Notify - Manage registered services (service provider) for integration.

INSTALLATION

Run Composer in your project:

composer require yidas/line-notify-sdk ~1.0.0

Then you could use SDK class after Composer is loaded on your PHP project:


USAGE

Before using any API methods, first you need to create a Client with configuration, then use the client to access LINE Notify API methods.

Auth Client

Create a LINE Notify Auth Client with API Authentication:

Parameters
Key Required Type Default Description
clientId Y string LINE Notify service's client ID
clientSecret Y string LINE Notify service's client Secret
debug N boolean false Debug mode: Throw error exception when API request or result fails
log N boolean false Log mode: Save all responses to each API request

getAuthUrl()

Get LINE Notify OAuth authorize URL

Example:

getAccessToken()

Get AccessToken with redirectUrl and callback's code

Example:

getCode()

Get code on callback redirect URL

getWebPath()

Get current web URL path

Notify Client

Create a LINE Notify Client with accessToekn setting:

Parameters
Key Required Type Default Description
debug N boolean false Debug mode: Throw error exception when API request or result fails
log N boolean false Log mode: Save all responses to each API request

notify()

Send notification concurrently based on accessToken(s)

Return Values: Number of successful notifications

Example:

Options
Option Type Description
message string 1000 characters max
imageThumbnail HTTP/HTTPS URL Maximum size of 240×240px JPEG
imageFullsize HTTP/HTTPS URL Maximum size of 2048×2048px JPEG
imageFile string Local file path
stickerPackageId number Package ID. (Sticker List)
stickerId number Sticker ID.
notificationDisabled boolean Deault is false

Example

imageFile requires to be a file path of string type

status()

Check accessToken connection status

Example:

revoke()

Revoke accessToken on the connected service side

Example:

setAccessTokens()

Set AccessTokens for sending notification

addAccessToken()

Add an AccessToken for sending notification

getRateLimit()

Get last response's Rate Limit information

Shared Methods

getResponseLogs()

Get response logs when log mode is enabled


RESOURCES

LINE Notify (EN)

LINE Notify API Document (EN)


All versions of line-notify-sdk with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4
guzzlehttp/guzzle Version >=5.3.1
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 yidas/line-notify-sdk contains the following files

Loading the files please wait ....