akeneo-salesforce/salesforce-api 问题修复 & 功能扩展

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

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

akeneo-salesforce/salesforce-api

Composer 安装命令:

composer require akeneo-salesforce/salesforce-api

包简介

A library for interacting with the Salesforce REST API and managing the OAuth flow

README 文档

README

Warning : Work in progess

###Aim

Call The SalesForce API (v37.0 at this time) in order to call API functionnalities easily. The main advantage is that you don't have to be preoccuped by the token, the library maintains it. Also, you are authentificated correctly to make a CLI application.

Install

$ composer require akeneo-salesforce/salesforce-api

Documentation

Usage

The client
$client = new Akeneo\SalesForce\Connector\SalesForceClient(
    $myUsername,
    $myPassword,
    $myClientId,
    $myClientSecret,
    $myLoginUrl,
    new GuzzleHttp\Client(),
    new Akeneo\SalesForce\Authentification\AccessTokenGenerator()
);

Usage in Symfony

This bundle can be easily integrated to a Symfony2 project, you just have to declare two services:

First declare your parameters in your parameters.yml

  • sales_force.username
  • sales_force.password
  • sales_force.client_id
  • sales_force.client_secret
  • sales_force.login_url (For example: 'https://login.salesforce.com/')
services:
    akeneo_sales_force.authentification.token_generator:
        class: Akeneo\SalesForce\Authentification\AccessTokenGenerator

    akeneo_sales_force.connector.client:
        class: Akeneo\SalesForce\Connector\SalesForceClient
        arguments:
            - "%sales_force.username%"
            - "%sales_force.password%"
            - "%sales_force.client_id%"
            - "%sales_force.client_secret%"
            - "%sales_force.login_url%"
            - "@guzzle.client"
            - "@akeneo_sales_force.authentification.token_generator"

And then use your client service like any other service.

Make a query

A QueryBuilder is given to make SOQL query.

See available functionnalities into the class itself.

Example

$queryBuilder = new Akeneo\SalesForce\Query\QueryBuilder();

$queryBuilder
            ->select('Id')
            ->from('Account')
            ->where($queryBuilder->getNotEqualCondition('Name', ':nameId'))
            ->setParameter('nameId', 'AccountPlop')
        ;

$client->search($queryBuilder->getQuery());

Next

More

This library is made with <3 by Akeneo

Do not hesitate to contribute.

Maintained by Anaël CHARDAN.

统计信息

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

GitHub 信息

  • Stars: 6
  • Watchers: 2
  • Forks: 22
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-07-05

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固