eosvn/laravel-a2reviews-client-api 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

eosvn/laravel-a2reviews-client-api

Composer 安装命令:

composer require eosvn/laravel-a2reviews-client-api

包简介

The laravel package integrate with A2Reviews Client API system. Development by A2Reviews, Inc.

README 文档

README

Total Downloads Latest Stable Version License Latest Stable Version Latest Unstable Version composer.lock

Overview

Laravel A2Reviews Client API lets you build apps, extensions or plugins to get reviews from the A2reviews APP. Including adding reviews to a store's products. It is used to import and export reviews through the API. This is the official package built and developed by A2Reviews, Inc.

Requirements

Installation

Execute the following command to get the package:

composer require eosvn/laravel-a2reviews-client-api

Update .env

A2REV_SITE_API_KEY=<your_a2reviews_api_key>
A2REV_SITE_API_SECRET=<your_a2reviews_api_secret>

Usage

Create an instance of the A2Reviews Client, then used to access the A2Reviews Client API.

<?php

use EOSVN\A2ReviewsClient\A2ReviewsClient;

$a2Review = new A2ReviewsClient();

Examples

In the examples below we just used some parameters as a demo. For detailed parameters please visit our documentation.

Product Reviews

APIs for reviews of product, allows to get the reviews of a product or all products. Make it possible to deploy on different platforms.

Get product reviews
$response = $a2Review->review->getProductReviews([
    'handle' => '{product_handle}',
    'limit' => 2 // Number record per page
]);
Get feature reviews
$response = $a2Review->review->getFeatureReviews([
    'limit' => 2
]);
Get block list reviews
$response = $a2Review->review->getBlockListReviews([
    'limit' => 2
]);
Get block reviews
$response = $a2Review->review->getBlockReviews([
    'limit' => 2
]);
Write review to product
$response = $a2Review->review->addReviewToProduct([
    'handle' => '{product_handle}',
    'review' => [
        'rating' => 4,
        'title' => 'Package title review.',
        'author' => 'Author name',
        'email' => 'author_email@gmail.com',
        'content' => 'Package content review.'
    ]
]);
Update a review
$response = $a2Review->review->updateReview([
    'id' => '{review_id}',
    'handle' => '{product_handle}',
    'review' => [
        'rating' => 2,
        'title' => 'Package title review (update).',
        'author' => 'Author name',
        'email' => 'author_email@gmail.com',
        'content' => 'Package content review.'
    ]
]);
Update image review
$response = $a2Review->review->updateImageReview([
    'id' => '{review_id}',
    'handle' => '{product_handle}',
    'image' => [
        'attachment' => '{image data base64}',
        'filename' => '{filename}'
    ]
]);

Client Site Settings

APIs for client site, allows to get the settings global, setting languages.

Get global settings
$response = $a2Review->setting->getGlobalSettings();
Get reviews languages
$response = $a2Review->setting->getReviewLanguages();
Get questions answers language
$response = $a2Review->setting->getQuestionAnswerLanguages();
Get common languages
$response = $a2Review->setting->getCommonLanguages();

After request, using below way to get data

$response->getData();

Documentation

A2Reviews - Official Client API Documentation

Changelog

Please see CHANGELOG for more information what has changed recently.

Security

If you discover a security vulnerability within laravel-a2reviews-client-api, please send an e-mail to A2Reviews, Inc via info@a2rev.com. All security vulnerabilities will be promptly addressed.

Credits

License

The Laravel framework is open-sourced software licensed under the MIT license.

统计信息

  • 总下载量: 3
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-09-26

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固