PHP library for accessing the Firefox Marketplace submission API
Перейти к файлу
Piotr Zalewa 55de4d7153 Merge pull request #26 from Waqar144/master
Improve Readme.md formatting
2015-07-17 19:54:43 +02:00
Tests Fixed typo on authors name 2013-12-23 14:42:24 -02:00
src/Mozilla/Marketplace Fixed typo on authors name 2013-12-23 14:42:24 -02:00
.gitignore Refactored to touch base with Object Calisthenics 2013-11-06 01:10:07 -05:00
.travis.yml Fixed .travis with php 5.3 2013-12-20 17:35:25 -02:00
README.md Improve Readme.md formatting 2015-07-16 23:36:37 +05:00
composer.json Fixed packagist namespaces 2013-11-06 01:39:15 -05:00
phpunit.xml.dist Refactored to touch base with Object Calisthenics 2013-11-06 01:10:07 -05:00

README.md

Marketplace PHP client

Build Status

A library to interact with Marketplace

Allows to validate, create and manipulate webapps and screenshots.


##Usage

#####To Test:

    composer install --dev

    ./vendor/bin/phpunir

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

  • composer

##Changelog

  • Each Object has it own responsibility
  • Each Object can be easily injected in frameworks like SF2 and ZF2
  • Guzzle keeps control of OAuth
  • 100% Coverage