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.
The main objective of this API is to search for product information by barcode GTIN / EAN.
##How to use
- Register here http://cosmos.bluesoft.io/api
- Get your Token
- Install the nuget package
Install-Package bluesoftapi-cosmos.net
- 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);