Skip to content
This repository has been archived by the owner on Mar 15, 2018. It is now read-only.
/ Marketplace.PHP Public archive

PHP library for accessing the Firefox Marketplace submission API

Notifications You must be signed in to change notification settings

mozilla/Marketplace.PHP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

69 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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:https://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

About

PHP library for accessing the Firefox Marketplace submission API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages