scoilnet/php-sdk 问题修复 & 功能扩展

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

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

scoilnet/php-sdk

Composer 安装命令:

composer require scoilnet/php-sdk

包简介

Scoilnet SDK for PHP

README 文档

README

Scoilnet's API allows you to easily search resources from scoilnets database on you own site.

For full documentation, see Scoilnet's developer documentation

Also check out the Scoilnet PHP SDK Demo that you can install on your own server.

Installation

Installation is a quick 4 step process:

  1. Install ScoilnetSDK
  2. Create your cache folder
  3. Get API authentication keys from Scoilnet
  4. Configuration search paramaters.

Step 1: Install ScoilnetSDK

The preferred way to install this library is to rely on Composer. Just check on Packagist the version you want to install (in the following example, we used "dev-master") and add it to your composer.json:

{
    "require": {
        // ...
        "Scoilnet/PHPSDK": "dev-master"
    }
}

Alternatively you can download the scoilnetsdk folder and add it to your project.

Step 2: Create your cache folder

For best performance a cache folder should be created that php can write too, but is not accessible by the web server.

Step 3:Get API authentication keys from Scoilnet

To use the api you will need to login too scoilnet and obtain a client id, client secret key and api key. Go to the [scoilnet api section] (https://www.scoilnet.ie/scoilnet-api) for more information on how to obtain the application keys.

Step 4: Configuration

For all requests, you must initialize the SDK with your Client ID, Client Secret and API Key.

    <?php

    require '../scoilnetsdk/ScoilnetClient.php';

    $config = [
                "client_id" =>"[YOUR CLIENT ID]",
                "client_secret" =>"[YOUR CLIENT SECRET]",
                "api_key" => "[YOUR API KEY]",
                ];
        
    $this->scoilnetClient = new \ScoilnetSDK\ScoilnetClient($config);
    
    //Set the cache folder that you created in step3
    $this->scoilnetClient->setCacheFile("/var/www/searchAPI/Cache/");

    //See [scoilnet search documentation] (https://www.scoilnet.ie/scoilnet-api/documentation) for list of possible paramater options
    $params = array();

    //Make a search request
    $response = $this->scoilnetClient->search($params);
    

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-10-31

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固