findAllProducts
Obter todos os produtos
/products
Usage and SDK Samples
curl -X GET\
-H "Accept: application/json"\
"{protocol}://localhost:8080/products"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ShopApi;
import java.io.File;
import java.util.*;
public class ShopApiExample {
public static void main(String[] args) {
ShopApi apiInstance = new ShopApi();
try {
array[ProductResponse] result = apiInstance.findAllProducts();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ShopApi#findAllProducts");
e.printStackTrace();
}
}
}
import io.swagger.client.api.ShopApi;
public class ShopApiExample {
public static void main(String[] args) {
ShopApi apiInstance = new ShopApi();
try {
array[ProductResponse] result = apiInstance.findAllProducts();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ShopApi#findAllProducts");
e.printStackTrace();
}
}
}
ShopApi *apiInstance = [[ShopApi alloc] init];
// Obter todos os produtos
[apiInstance findAllProductsWithCompletionHandler:
^(array[ProductResponse] output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
var Shopptex = require('shopptex');
var api = new Shopptex.ShopApi()
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.findAllProducts(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class findAllProductsExample
{
public void main()
{
var apiInstance = new ShopApi();
try
{
// Obter todos os produtos
array[ProductResponse] result = apiInstance.findAllProducts();
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling ShopApi.findAllProducts: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$api_instance = new Swagger\Client\ApiShopApi();
try {
$result = $api_instance->findAllProducts();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ShopApi->findAllProducts: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ShopApi;
my $api_instance = WWW::SwaggerClient::ShopApi->new();
eval {
my $result = $api_instance->findAllProducts();
print Dumper($result);
};
if ($@) {
warn "Exception when calling ShopApi->findAllProducts: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = swagger_client.ShopApi()
try:
# Obter todos os produtos
api_response = api_instance.find_all_products()
pprint(api_response)
except ApiException as e:
print("Exception when calling ShopApi->findAllProducts: %s\n" % e)