定制 draugiem/draugiem-php-sdk 二次开发

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

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

draugiem/draugiem-php-sdk

最新稳定版本:v1.3.7

Composer 安装命令:

composer require draugiem/draugiem-php-sdk

包简介

Draugiem.lv API PHP library

README 文档

README

Draugiem.lv API library for PHP

Latest Stable Version Latest Unstable Version

To make application development faster and easier, we've created a PHP library that performs API calls and automatically converts the requested data to the PHP data structures. PHP library can be used both for integrated applications and draugiem.lv Passport applications.

The library requires PHP5 environment and uses PHP session mechanism for storing user data during sessions. To be able to perform API calls, PHP configuration you have to enable access to HTTP URLs for file_get_contents function (enable allow_url_fopen setting in PHP configuration).

In order to use PHP library, you have to include file DraugiemApi.php in your application.

Usage

Check examples for more on how to use the API library.

require 'DraugiemApi.php';

$draugiem = new DraugiemApi( 'YOUR_APP_ID', 'YOUR_APP_KEY' );

session_start();
$draugiem->cookieFix(); // Iframe cookie workaround for IE and Safari

$session = $draugiem->getSession();
if ($session) {
	$user = $draugiem->getUserData(); //Get user info
}

Usage with composer

  1. Add this package to your composer.json

    "draugiem/draugiem-php-sdk": "1.3.*"
  2. Update composer.json packages

    composer update
    
  3. Use library as shown in examples

    $draugiem = new DraugiemApi( 'YOUR_APP_ID', 'YOUR_APP_KEY' );

统计信息

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

GitHub 信息

  • Stars: 12
  • Watchers: 10
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2014-09-16