PHPackages                             ochi51/cybozu-http-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. ochi51/cybozu-http-bundle

ActiveLibrary[HTTP &amp; Networking](/categories/http)

ochi51/cybozu-http-bundle
=========================

Symfony2 HTTP client bundle for cybozu.com API (kintone API and User API)

1.0.0(9y ago)216.8k1PHPPHP &gt;=5.5.0

Since Oct 4Pushed 9y ago2 watchersCompare

[ Source](https://github.com/ochi51/CybozuHttpBundle)[ Packagist](https://packagist.org/packages/ochi51/cybozu-http-bundle)[ RSS](/packages/ochi51-cybozu-http-bundle/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependencies (5)Versions (10)Used By (0)

CybozuHttpBundle[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](https://github.com/ochi51/CybozuHttpBundle/tree/master/LICENSE)
===============================================================================================================================================================================================================================================================================================================================================================

[](#cybozuhttpbundle)

[![Circle CI](https://camo.githubusercontent.com/0871a6b0430aad2d7428cdfea6442e99318b2d5b300fe9d465a0e4a3638f2415/68747470733a2f2f636972636c6563692e636f6d2f67682f6f63686935312f4379626f7a754874747042756e646c652e7376673f7374796c653d737667)](https://circleci.com/gh/ochi51/CybozuHttpBundle)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/594847ad6e38a40a4fb83e5b22de0215c23b051ed43b62ae93374972dfe4cfdc/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6f63686935312f4379626f7a754874747042756e646c652f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/ochi51/CybozuHttpBundle/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/2f526e475cc5c03278ad862c760daa57a6bea2b1f1461eed235bb9403024d0d7/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6f63686935312f4379626f7a754874747042756e646c652f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/ochi51/CybozuHttpBundle/?branch=master)[![Build Status](https://camo.githubusercontent.com/678695bfc71bf2bb4c8cc5f5b9e702a123ed30687639376d44ae958141e66258/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6f63686935312f4379626f7a754874747042756e646c652f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/ochi51/CybozuHttpBundle/build-status/master)

Symfony bundle that integrates the [Cybozu HTTP](https://github.com/ochi51/cybozu-http) by providing easy-to-use services and configuration.

cybozu.com API Documentation
----------------------------

[](#cybozucom-api-documentation)

[Japanese](https://cybozudev.zendesk.com/hc/ja)[English](https://developer.kintone.io/hc/en-us)

Requirements
------------

[](#requirements)

- PHP &gt;=5.5
- Composer
- Symfony &gt;=3.1

Installation
------------

[](#installation)

The recommended way to install Cybozu HTTP is with [Composer](https://getcomposer.org/). Composer is a dependency management tool for PHP that allows you to declare the dependencies your project needs and installs them into your project.

```
    $ curl -sS https://getcomposer.org/installer | php
    $ mv composer.phar /usr/local/bin/composer

```

You can add Cybozu HTTP as a dependency using the composer

```
    $ composer require ochi51/cybozu-http-bundle

```

Alternatively, you can specify Cybozu HTTP as a dependency in your project's existing composer.json file:

```
    {
       "require": {
          "ochi51/cybozu-http-bundle": "^1.0"
       }
    }

```

After installing, you need to register the bundle in your application.

```
    // app/AppKernel.php
    class AppKernel extends Kernel
    {
        // ...
        public function registerBundles()
        {
            $bundles = array(
                // ...
                new CybozuHttpBundle\CybozuHttpBundle()
            );
        }
    }

```

Configuration
-------------

[](#configuration)

There are two ways that configure cybozu.com account information.

2. User entity has it.

```
    # app/config.yml
    cybozu_http:
        cert_dir:       /path/to/cert_dir
        logfile:        /path/to/logfile.log

```

```
    use CybozuHttpBundle\Entity\UserInterface;

    class User implements UserInterface
    {
        public function getCybozuHttpConfig()
        {
            return [
                "domain" =>         "cybozu.com",
                "subdomain" =>      "changeMe",
                "use_api_token" =>    false,
                "login" =>          "changeMe",
                "password" =>       "changeMe",
                "token" =>          null,
                "use_basic" =>       false,
                "basic_login" =>     null,
                "basic_password" =>  null,
                "use_client_cert" =>  false,
                "cert_file" =>       "cert.pem",
                "cert_password" =>   null
            ];
        }

        public function getDebugMode()
        {
            return true;
        }
    }

```

Quick example
-------------

[](#quick-example)

```
