Skip to content

penihel/bluesoftapi-cosmos.net

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

bluesoftapi-cosmos.net

C# client implementation to API http://cosmos.bluesoft.io/api

This project was initiated by Brazilians, and there is all the documentation in Portuguese for this API (http://cosmos.bluesoft.com.br/api). But the official language of the project will always be English to facilitate the spread of knowledge outside Brazil.

API - Overview

The main objective of this API is to search for product information by barcode GTIN / EAN.

##How to use

Registration
Installation
  • Install the nuget package
Install-Package bluesoftapi-cosmos.net
Use
  • Import Bluesoft.Cosmos namespace
  using Bluesoft.Cosmos;
  • Create a instance of CosmosClient class passing your Token and endpoint
  string myToken = "....";
  CosmosClient client = new CosmosClient(CosmosEndpoint.BR, myToken);
  • Call a API operation
  string gtinBarCode = "....";
  var product = await client.GetProductByBarCodeAsync(gtinBarCode);
  
  

  Console.WriteLine(product.Description);
  Console.WriteLine(product.Price);