karmapug / karmap-sdk-php
PHP版本的Karmap SDK官方仓库
0.0.7
2018-04-23 12:27 UTC
Requires (Dev)
- phpdocumentor/phpdocumentor: 2.8.*
- phpunit/phpunit: 3.7.*
- squizlabs/php_codesniffer: 2.3.*
This package is not auto-updated.
Last update: 2020-09-04 19:23:32 UTC
README
PHP版本的Karmap SDK官方仓库。
此SDK包含用于公共Karmap API的包装类,提供计算地球上特定地点个人占星术命盘的方法。
先决条件
您首先需要在karmap.com注册为外部合作伙伴;然后您将收到一个客户端代码和密钥。这些凭据将在设置包装类以访问API时使用。
使用方法
请参阅以下示例,这些示例可以重用于您的项目中。
为个人解读地点
$coreApiWrapper = new CoreApiWrapper('client_code', 'client_secret'); $anonymousInterpretation = $coreApiWrapper->createAnonymousInterpretation( $partnerCode, // '' $personBirthdate, // '1970-20-03 23:54:00' $personBirthplace, // 'Berlin, Germany' $personGmtOffset, // '+0100' $personLatitude, // $personLongitude, // $placeAddress, // '' $placeLatitude, // $placeLongitude, // $level, // 'exact adress, microcosm' $interpretationType, // 'basic' $language // 'de' );
通过代码加载解读数据
$coreApiWrapper = new CoreApiWrapper('client_code', 'client_secret'); $anonymousInterpretation = $daw->getAnonymousInterpretation($code, 'de');
获取可用的产品列表
$coreApiWrapper = new CoreApiWrapper('client_code', 'client_secret'); $productList = $coreApiWrapper->getProducts();