You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

90 lines
2.0 KiB
PHP

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<?php
namespace Org\Ipa365SDK;
use Think\Exception;
use Qiniu\json_decode;
/**
* Ipa365
* @author zgc
* 2019/9/19 15:00
*/
class Ipa365 {
private $token = "";
public function __construct($token="") {
$this->token = $token;
}
/*
* 获得签包任务完成后的下载地址
* status int 任务进度 0还未生成下载地址 1已经生成下载地址
filename string xxx.ipa
*/
public function down($data) {
$apiurl = "https://app.ipa365.com/Kirin/Api/Down";
$r = curl_post($apiurl, $data);
return json_decode($r, true);
}
/**
* 获得签包任务进度
*/
public function process() {
$apiurl = "https://app.ipa365.com/Kirin/Api/Process";
$r = curl_post($apiurl, $data);
return json_decode($r, true);
}
/**
* 授予udid下载权限并获得签包任务id
* 调用此接口获得任务id后需要先调用一下 Down 接口触发签包任务开始后调用process查看任务进度最终调用 Down 获得ipa下载地址
*/
public function request() {
$apiurl = "https://app.ipa365.com/Kirin/Api/Request";
$r = curl_post($apiurl, $data);
return json_decode($r, true);
}
/**
* 获取授予应用的信息
*/
public function getinfo() {
$apiurl = "https://app.ipa365.com/Kirin/Api/GetInfo";
$r = curl_post($apiurl, $data);
return json_decode($r, true);
}
/**
* 获取 授予udid下载权限并获取下载地址
*/
public function udidRequest($data) {
$apiurl = "https://app.ipa365.com/Kirin/OpenApi/UdidRequest";
$r = curl_post($apiurl, $data);
return json_decode($r, true);
}
/**
* 查询授权码列表
*/
public function ticketList($data) {
$apiurl = "https://app.ipa365.com/Kirin/OpenApi/TicketList";
$r = curl_post($apiurl, $data);
return json_decode($r, true);
}
/**
* 查询单个授权码状态
*/
public function getCodeStatus() {
$apiurl = "https://app.ipa365.com/Kirin/OpenApi/GetInfo";
$r = curl_post($apiurl, $data);
return json_decode($r, true);
}
}