pdfloresjdav/api-bundle

Symfony DoYouBuzz Api 连接包

安装次数: 2,280

依赖: 0

建议者: 0

安全性: 0

星标: 0

关注者: 0

分支: 0

开放问题: 0

类型:symfony-bundle

dev-master 2018-04-03 20:58 UTC

This package is not auto-updated.

Last update: 2024-09-19 13:33:04 UTC


README

为了满足一些定制需求,请记住进行分支操作并阅读文档

要求

你必须

  • 有一个symfony2项目:>= v2.1
  • 拥有DoYouBuzz API密钥和API密钥
  • 拥有安装了cURL的本地Web服务器
  • 知道你是否拥有合作伙伴或应用程序访问权限

安装

##使用composer

dyb/api-bundle

"require": { "dyb/api-bundle": "dev-master" },

##配置

注册Bundle

将以下行添加到你的AppKernel.php

new Dyb\ApiBundle\DybApiBundle(),

在路由.yml中声明路由

dyb_showcase:
    resource: "@DybApiBundle/Controller/Showcase/"
    type:     annotation
    prefix:   /dyb/showcase/

将以下行添加到你的config.yml配置中,例如在你的app/config/config.yml

dyb_api:
    showcase:
        key:       xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
        secret:    xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

##功能

##展示

###获取你的用户列表,分页显示

[
    {"username":"john@doe.me","email":"john@doe.me","firstname":"john","lastname":"doe","id":311243},
    {"username":"jane@doe.me","email":"jane@doe.me","firstname":"jane","lastname":"doe","id":311245}
]

访问此URL:/dyb/showcase/list

###获取你的用户选择列表

{
    "1":"John Doe",
    "2":"Jane Doe"
}

访问此URL:/dyb/showcase/choice