Download the PHP package gpupo/cnova-sdk without Composer

On this page you can find all versions of the php package gpupo/cnova-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package cnova-sdk

Cnova-SDK

SDK Não Oficial para integração a partir de aplicações PHP com as APIs da Cnova Marketplace (Extra.com.br, Pontofrio.com.br, Casasbahia.com.br)

Paypal Donations

Requisitos para uso

Este componente não é uma aplicação Stand Alone e seu objetivo é ser utilizado como biblioteca. Sua implantação deve ser feita por desenvolvedores experientes.

Isto não é um Plugin!

As opções que funcionam no modo de comando apenas servem para depuração em modo de desenvolvimento.

A documentação mais importante está nos testes unitários. Se você não consegue ler os testes unitários, eu recomendo que não utilize esta biblioteca.

Direitos autorais e de licença

Este componente está sob a licença MIT

Para a informação dos direitos autorais e de licença você deve ler o arquivo de licença que é distribuído com este código-fonte.

Resumo da licença

Exigido:

Permitido:

Proibido:


Indicadores de qualidade

Build Status Scrutinizer Code Quality Codacy Badge Code Climate Test Coverage


Agradecimentos


Instalação

Adicione o pacote cnova-sdk ao seu projeto utilizando composer:

composer require gpupo/cnova-sdk

Uso

Este exemplo demonstra o uso simplificado a partir do Factory:

Parâmetro Descrição Valores possíveis
client_id Chave da loja string
access_token Token de autorização da aplicação string
version Identificação do Ambiente sandbox, prod (produção)
registerPath Quando informado, registra no diretório informado, os dados de cada requisição executada

Acesso a lista de produtos cadastrados:

$produtosCadastrados = $manager->fetch(); // Collection de Objetos Product

Acesso a informações de um produto cadastrado e com identificador conhecido:

$produto = $manager->findById(9)); // Objeto Produto
echo $product->getTitle(); // Acesso ao nome do produto de Id 9

Criação de um produto:

$data = []; // Veja o formato de $data em Resources/fixture/Product/ProductId.json
$product = $cnovaSdk->createProduct($data);

Envio do produto para o Marketplace:

$manager->save($product);

Registro (log)

//...
use Monolog\Logger;
use Monolog\Handler\StreamHandler;
//..
$logger = new Logger('foo');
$logger->pushHandler(new StreamHandler('Resources/logs/main.log', Logger::DEBUG));
$cnovaSdk->setLogger($logger);

Console

Lista de comandos disponíveis:

./bin/main

Você pode verificar suas credenciais Cnova na linha de comando:

./bin/main credential

Você poder criar um arquivo chamado app.json com suas configurações personalizadas, as quais serão utilizadas na linha de comando:

Utilize como modelo o arquivo app.json.dist

Dica: Verifique os logs gerados em Resources/logs/main.log


Links


Desenvolvimento

git clone --depth=1  [email protected]:gpupo/cnova-sdk.git
cd cnova-sdk;
ant;

Personalize a configuração do phpunit:

cp phpunit.xml.dist phpunit.xml;

Personalize os parâmetros!

Dica: Verifique os logs gerados em var/log/main.log


Propriedades dos objetos

Todo


Propriedades dos objetos

CnovaSdk\Client\Client

CnovaSdk\Entity\Order\Customer\Customer

CnovaSdk\Entity\Order\Customer\Phones\Phone

CnovaSdk\Entity\Order\Items\Items

CnovaSdk\Entity\Order\Items\Product\Product

CnovaSdk\Entity\Order\Manager

CnovaSdk\Entity\OrderCollection

CnovaSdk\Entity\Order\Order

CnovaSdk\Entity\Order\Trackings\Tracking\Invoice

CnovaSdk\Entity\Order\Trackings\Tracking\Tracking

CnovaSdk\Entity\Product\Loads\Loads

CnovaSdk\Entity\Product\Loads\Manager

CnovaSdk\Entity\Product\Loads\Metadata

CnovaSdk\Entity\Product\Manager

CnovaSdk\Entity\Product\Price

CnovaSdk\Entity\Product\ProductCollection

CnovaSdk\Entity\Product\Product

CnovaSdk\Entity\Product\Stock

CnovaSdk\Factory

Lista de dependências (libraries)

Name Version Description
codeclimate/php-test-reporter v0.3.2 PHP client for reporting test coverage to Code Climate
doctrine/annotations v1.2.7 Docblock Annotations Parser
doctrine/cache v1.6.0 Caching library offering an object-oriented API for many cache backends
doctrine/collections v1.3.0 Collections Abstraction library
doctrine/common v2.5.3 Common Library for Doctrine projects
doctrine/inflector v1.1.0 Common String Manipulations with regard to casing and singular/plural rules.
doctrine/instantiator 1.0.5 A small, lightweight utility to instantiate objects in PHP without invoking their constructors
doctrine/lexer v1.0.1 Base library for a lexer that can be used in Top-Down, Recursive Descent Parsers.
gpupo/cache 1.3.0 Caching library that implements PSR-6
gpupo/common 1.6.6 Common Objects
gpupo/common-sdk 2.0.11 Componente de uso comum entre SDKs para integração a partir de aplicações PHP com Restful webservices
guzzle/guzzle v3.9.3 PHP HTTP client. This library is deprecated in favor of https://packagist.org/packages/guzzlehttp/guzzle
monolog/monolog 1.19.0 Sends your logs to files, sockets, inboxes, databases and various web services
myclabs/deep-copy 1.5.1 Create deep copies (clones) of your objects
phpdocumentor/reflection-common 1.0 Common reflection classes used by phpdocumentor to reflect the code structure
phpdocumentor/reflection-docblock 3.1.0 With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.
phpdocumentor/type-resolver 0.2
phpspec/prophecy v1.6.1 Highly opinionated mocking framework for PHP 5.3+
phpunit/php-code-coverage 4.0.0 Library that provides collection, processing, and rendering functionality for PHP code coverage information.
phpunit/php-file-iterator 1.4.1 FilterIterator implementation that filters files based on a list of suffixes.
phpunit/php-text-template 1.2.1 Simple template engine.
phpunit/php-timer 1.0.8 Utility class for timing
phpunit/php-token-stream 1.4.8 Wrapper around PHP's tokenizer extension.
phpunit/phpunit 5.4.6 The PHP Unit Testing framework.
phpunit/phpunit-mock-objects 3.2.3 Mock Object library for PHPUnit
psr/cache 1.0.0 Common interface for caching libraries
psr/log 1.0.0 Common interface for logging libraries
satooshi/php-coveralls v1.0.1 PHP client library for Coveralls API
sebastian/code-unit-reverse-lookup 1.0.0 Looks up which function or method a line of code belongs to
sebastian/comparator 1.2.0 Provides the functionality to compare PHP values for equality
sebastian/diff 1.4.1 Diff implementation
sebastian/environment 1.3.7 Provides functionality to handle HHVM/PHP environments
sebastian/exporter 1.2.2 Provides the functionality to export PHP variables for visualization
sebastian/global-state 1.1.1 Snapshotting of global state
sebastian/object-enumerator 1.0.0 Traverses array structures and object graphs to enumerate all referenced objects
sebastian/peek-and-poke dev-master a8295 Proxy for accessing non-public attributes and methods of an object
sebastian/recursion-context 1.0.2 Provides functionality to recursively process PHP variables
sebastian/resource-operations 1.0.0 Provides a list of PHP built-in functions that operate on resources
sebastian/version 2.0.0 Library that helps with managing the version number of Git-hosted PHP projects
symfony/config v3.1.1 Symfony Config Component
symfony/console v3.1.1 Symfony Console Component
symfony/event-dispatcher v2.8.7 Symfony EventDispatcher Component
symfony/filesystem v3.1.1 Symfony Filesystem Component
symfony/polyfill-mbstring v1.2.0 Symfony polyfill for the Mbstring extension
symfony/stopwatch v3.1.1 Symfony Stopwatch Component
symfony/yaml v3.1.1 Symfony Yaml Component
twig/twig v1.24.1 Twig, the flexible, fast, and secure template language for PHP
webmozart/assert 1.0.2 Assertions to validate method input/output with nice error messages.

All versions of cnova-sdk with dependencies

PHP Build Version
Package Version
Requires php Version ^5.6 || ^7.0
ext-curl Version *
symfony/console Version 3.3.10
gpupo/cache Version 1.3.2
gpupo/common Version 1.7.7
gpupo/common-sdk Version 2.2.15
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package gpupo/cnova-sdk contains the following files

Loading the files please wait ....