Merge pull request #26 from Waqar144/master Improve Readme.md formatting
Merge pull request #26 from Waqar144/master
Improve Readme.md formatting
A library to interact with Marketplace
Allows to validate, create and manipulate webapps and screenshots.
composer install --dev ./vendor/bin/phpunir
First go and obtain your key and secret from the Api
$target = new Target; //update the Target URL if necessary with $target->setUrl($url)
$credential = new Credential; $credential->setConsumerKey(123); $credential->setConsumerSecret(456);
$client = new Mozilla\Marketplace\Client; $client->setTarget($target); $client->setCredential($credential);
// 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"; }
版权所有:中国计算机学会技术支持:开源发展技术委员会 京ICP备13000930号-9 京公网安备 11010802032778号
Marketplace PHP client
A 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
Instantiate a credential object
Pass it to the Client
Create webapp if the manifest is valid
Requires
Changelog