承接 pendonl/php-club-dataservice 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

pendonl/php-club-dataservice

最新稳定版本:0.3.1

Composer 安装命令:

composer require pendonl/php-club-dataservice

包简介

PHP wrapper around the Sportlink Club.Dataservice API

README 文档

README

This package contains a PHP wrapper around the Sportlink Club.Dataservice API. It aims to make working with the API a breeze.

Installation

Install the package using composer:

composer require pendonl/php-club-dataservice

Require the vendor/autoload.php file:

require 'vendor/autoload.php';

Create an instance of the API using your Sportlink Club.Dataservice Client ID:

use \PendoNL\ClubDataservice\Api as KnvbApi;
$api = new KnvbApi('client_id');
Setting the API key later (DI)

You can set the 'api_key' later. So you can use it better with dependency injection. Here's an example:

// app/Providers/AppServiceProvider.php

$this->app->bind(\App\Knvb\ApiInterface::class, function() {
    return new \App\Knvb\Api();
});

// Some other class

public function handle(\App\Knvb\ApiInterface $api) {
    $club = $api->setApiKey('your_api_key_here')->getClub();
    
    ....
}

It al starts by getting the club details.

$club = $api->getClub()

All properties - similar to the json response provided by the API - are made public, so you are free to use $club->clubnaam for example. Once you get the club details you can proceed by requesting the teams and related entities.

$teams = $club->getTeams();
foreach($teams as $team) {

    // $team->teamnaam;

    // Get competitions
    $competitions = $team->competitions();
    
    foreach($competitions as $competition) {
    
        // $competition->competitienaam;
    
        // Fixtures
        $competition->fixtures();
        
        // Results
        $competition->results();
        
        // Table standings
        $competition->table();
        
    }
    
}

Thanks to

Security

If you discover any security related issues, please email joshua@pendo.nl instead of using the issue tracker.

About Pendo

Pendo is a webdevelopment agency based in Maastricht, Netherlands. If you'd like, you can visit our website.

License

The MIT License (MIT). Please see License File for more information.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-08-05

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固