在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:mozilla/Marketplace.PHP开源软件地址:https://github.com/mozilla/Marketplace.PHP开源编程语言:PHP 100.0%开源软件介绍:Marketplace PHP clientA library to interact with Marketplace Allows to validate, create and manipulate webapps and screenshots. ##Usage #####To Test:
First go and obtain your key and secret from the Api #####Instantiate a target object $target = new Target;
//update the Target URL if necessary with $target->setUrl($url) #####Instantiate a credential object $credential = new Credential;
$credential->setConsumerKey(123);
$credential->setConsumerSecret(456); #####Pass it to the Client $client = new Mozilla\Marketplace\Client;
$client->setTarget($target);
$client->setCredential($credential); #####Create webapp if the manifest is valid // validate manifest
$response = $client->validateManifest('http://example.com/manifest.webapp');
echo "\n\nManifest id: ".$response['id'];
echo "\nManifest is ";
if ($response["valid"]) {
echo "valid - creating webapp...";
// create webapp
$response = $client->createWebapp($response['id']);
echo "\n\nWebapp id: ".$response['id'];
} else {
echo "invalid";
} ##Requires
##Changelog
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论