2017 © Pedro PelĂĄez
 

library marketplace

Mozilla Marketplace PHP SDK

image

mozilla/marketplace

Mozilla Marketplace PHP SDK

  • Monday, December 23, 2013
  • by kinncj
  • Repository
  • 1 Watchers
  • 0 Stars
  • 0 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 46 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Marketplace PHP client

Build Status, (*1)

A library to interact with Marketplace_, (*2)

Allows to validate, create and manipulate webapps and screenshots, (*3)

Usage, (*4)

#

To Test::, (*5)

composer install --dev

./vendor/bin/phpunir

Obtain your key and secret from http://marketplace.mozilla.org/developers/api, (*6)

Instantiate a target object::, (*7)

$target = new Target;
//update the Target URL if necessary with $target->setUrl($url)

Instantiate a credential object::, (*8)

$credential = new Credential;
$credential->setConsumerKey(123);
$credential->setConsumerSecret(456);

Pass it to the Client::, (*9)

$client = new Mozilla\Marketplace\Client;
$client->setTarget($target);
$client->setCredential($credential);

Create webapp if manifest valid::, (*10)

// 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, (*11)

#

composer, (*12)

Changelog, (*13)

#
  • 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

.. _Marketplace: http://marketplace.mozilla.org, (*14)

The Versions

23/12 2013

dev-hhvm

dev-hhvm

Mozilla Marketplace PHP SDK

  Sources   Download

The Requires

 

The Development Requires

by Steve Gricci
by Piotr Zalewa

20/12 2013

dev-master

9999999-dev

Mozilla Marketplace PHP SDK

  Sources   Download

The Requires

 

The Development Requires

by Steve Gricci
by Piotr Zalewa