定制 kanekescom/laravel-siasn-api 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

kanekescom/laravel-siasn-api

最新稳定版本:v2.0.21

Composer 安装命令:

composer require kanekescom/laravel-siasn-api

包简介

A Laravel package for seamless integration with the SIASN REST API

README 文档

README

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

A Laravel package for seamless integration with the SIASN REST API. This library is the abstraction of SIASN API for access from applications written with Laravel PHP Framework.

Support Us

Want to provide tangible support? Use the following platforms to contribute to open-source software development:

Your support is greatly appreciated!

Installation

Install the package via Composer:

composer require kanekescom/laravel-siasn-api

Publish the config file:

php artisan vendor:publish --tag="siasn-api-config"

Or complete all installations with:

php artisan siasn-api:install

Usage

Token Generator

Generate APIM Token:

php artisan siasn:apim-token

Generate SSO Token:

php artisan siasn:sso-token

Generate both APIM and SSO Tokens:

php artisan siasn:token

Use --fresh to always request a new token.

Remove Tokens

php artisan siasn:forget-token

Available Token Methods

use Kanekes\Siasn\Api\Credentials\Token;

Token::getNewApimToken(); // Always request a new APIM token
Token::getApimToken(); // Request APIM token

Token::getNewSsoToken(); // Always request a new SSO token
Token::getSsoToken(); // Request SSO token

Token::forget(); // Remove APIM and SSO tokens

Send a Request Using Commands

GET Request:

php artisan siasn:get {endpoint}

Example:

php artisan siasn:get https://apimws.bkn.go.id:8243/apisiasn/1.0/referensi/ref-unor

POST Request:

php artisan siasn:post {endpoint}

Send a Request Using Class

The Siasn class uses Laravel's Http class (Illuminate\Support\Facades\Http):

use Kanekes\Siasn\Api\Facades\Siasn;

Siasn::get($endpoint, $params);

For dual authentication (SSO), use:

use Kanekes\Siasn\Api\Facades\Siasn;

Siasn::withSso()->get($endpoint, $params);

Testing

composer test

Our Other Cool Packages

Referensi APIs

SIASNAPI-SIMPEG APIs

Changelog

See CHANGELOG for recent updates.

Contributing

See CONTRIBUTING for contribution guidelines.

Security Vulnerabilities

See our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). See License File for details.

统计信息

  • 总下载量: 2.54k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 4
  • 点击次数: 0
  • 依赖项目数: 5
  • 推荐数: 0

GitHub 信息

  • Stars: 4
  • Watchers: 2
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-09-17