# smms-sdk **Repository Path**: lzh1104_admin/smms-sdk ## Basic Information - **Project Name**: smms-sdk - **Description**: sm.ms图床v2.0接口sdk - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2022-02-14 - **Last Updated**: 2022-02-14 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README
.
## Installing ```shell $ composer require lzh1104/smms-sdk -vvv ``` ## Usage #### 实例化 ``` /** * @var \SmmsSdk\Application; */ $smms = new \SmmsSdk\Application([ 'debug' => false, 'base_url' => 'https://sm.ms/api/v2', 'auth' => [ 'username' => '你的用户名', 'password' => '你的密码', ], 'log' => [ 'name' => 'smms', 'file' => __DIR__.'/smms.log', 'level' => 'debug', 'permission' => 0777, ] ]); ``` #### 用户信息 ``` $info = $smms->user->profile(); ``` #### 图片信息 ``` $info = $smms->image->upload_history(); ``` ## Contributing You can contribute in one of three ways: 1. File bug reports using the [issue tracker](https://github.com/lzh1104/smms-sdk/issues). 2. Answer questions or fix bugs on the [issue tracker](https://github.com/lzh1104/smms-sdk/issues). 3. Contribute new features or update the wiki. _The code contribution process is not very formal. You just need to make sure that you follow the PSR-0, PSR-1, and PSR-2 coding guidelines. Any new code contributions must be accompanied by unit tests where applicable._ ## License MIT ## Thanks - [hanson/foundation-sdk](https://github.com/Hanson/foundation-sdk)