Download the PHP package weiwork/weiworkapi without Composer

On this page you can find all versions of the php package weiwork/weiworkapi. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package weiworkapi

About

weworkapi_php 是为了简化开发者对企业微信API接口的使用而设计的,API调用库系列之php版本
包括企业API接口、消息回调处理方法、第三方开放接口等  
本库仅做示范用,并不保证完全无bug;
另外,作者会不定期更新本库,但不保证与官方API接口文档同步,因此一切以官方文档为准。

更多来自个人开发者的其它语言的库推荐:
python : https://github.com/sbzhu/weworkapi_python [email protected](企业微信团队)
ruby : https://github.com/mycolorway/wework MyColorway(个人开发者)
php : https://github.com/sbzhu/weworkapi_php [email protected](企业微信团队)
golang : https://github.com/sbzhu/weworkapi_golang [email protected](企业微信团队)
golang : https://github.com/doubliekill/EnterpriseWechatSDK [email protected](个人开发者)

Requirement

经测试,PHP 5.3.3 ~ 7.2.0 版本均可使用

Director

├── api // API 接口
│   ├── datastructure // API接口需要使用到的一些数据结构
│   ├── examples // API接口的测试用例
│   ├── README.md
│   └── src // API接口的关键逻辑
├── callback // 消息回调的一些方法
├── config.php
├── README.md
└── utils // 一些基础方法

Usage

将本项目下载到你的目录,既可直接引用相关文件  

详细使用方法参考每个模块下的测试用例

关于token的缓存

token是需要缓存的,不能每次调用都去获取token,否则会中频率限制
在本库的设计里,token是以类里的一个变量缓存的
比如api/src/CorpAPI.class.php 里的$accessToken变量
在类的生命周期里,这个accessToken都是存在的, 当且仅当发现token过期,CorpAPI类会自动刷新token
刷新机制在 api/src/API.class.php
所以,使用时,只需要全局实例化一个CorpAPI类,不要析构它,就可一直用它调函数,不用关心 token

当然,如果要更严格的做的话,建议自行修改,,失效周期设置为2小时。

Contact us

[email protected]
[email protected]


All versions of weiworkapi with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.3,<=7.2.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package weiwork/weiworkapi contains the following files

Loading the files please wait ....