Skip to content

Enhance README feature descriptions#12

Merged
stephanstapel merged 1 commit intomainfrom
codex/update-readme.md-with-new-features
Dec 30, 2025
Merged

Enhance README feature descriptions#12
stephanstapel merged 1 commit intomainfrom
codex/update-readme.md-with-new-features

Conversation

@stephanstapel
Copy link
Owner

Motivation

  • Make the new API capabilities easier to discover by describing concrete use cases and benefits for each demo feature.
  • Help developers run the demo project quickly by adding a simple quickstart and explaining how to provide an API key.
  • Clarify what each demo demonstrates by adding inline code comments so examples are easier to copy/paste into real integrations.
  • Reduce confusion around bulk/batch catalog usage by showing a typed batchRequests example and explicit parameter construction.

Description

  • Expanded README.md "New in this update" section with richer descriptions for user/token details, invoice transactions, order management, advanced catalog tooling, and color list endpoints.
  • Added a demo project quickstart that instructs users to create BrickOwlSharp.Demos/apikey.txt, pick a demo in BrickOwlSharp.Demos/Program.cs, and run dotnet run --project BrickOwlSharp.Demos.
  • Enriched demo code snippets with inline comments and clearer examples for UserDemo, InvoiceDemo, OrderManagementDemo, CatalogAdvancedDemo, and ColorDemo.
  • Presented a corrected batch-request example using a typed tuple array and per-request parameter dictionaries for BulkBatchAsync calls.

Testing

  • No automated tests were executed because this is a documentation-only change.
  • The updated README.md was staged and committed to the branch successfully.

Codex Task

Copilot AI review requested due to automatic review settings December 30, 2025 22:56
@stephanstapel stephanstapel merged commit 44407d7 into main Dec 30, 2025
6 checks passed
@stephanstapel stephanstapel deleted the codex/update-readme.md-with-new-features branch December 30, 2025 22:57
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +45 to +47
1. Add your API key
- Create `BrickOwlSharp.Demos/apikey.txt` with your BrickOwl API key.
2. Pick a demo in `BrickOwlSharp.Demos/Program.cs`

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Fix apikey.txt location in quickstart

The quickstart tells users to create BrickOwlSharp.Demos/apikey.txt and then run dotnet run --project BrickOwlSharp.Demos. The demo app reads apikey.txt relative to the current working directory (see BrickOwlSharp.Demos/Program.cs), so if they execute the command from the repo root as shown, the file won’t be found and the demo fails at startup. Consider instructing users to place apikey.txt in the working directory where they run the command (e.g., repo root) or update the demo code/readme to reference the project-relative path.

Useful? React with 👍 / 👎.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR enhances the README documentation to improve discoverability and usability of the BrickOwlSharp client library by adding comprehensive feature descriptions, a quickstart guide, and enriched code examples.

  • Expanded feature descriptions for new API capabilities (user details, invoice transactions, order management, advanced catalog endpoints, and color list)
  • Added demo project quickstart instructions with clear steps for API key setup and running demos
  • Provided inline-commented code examples for five key demo scenarios to support copy-paste integration

Comment on lines +85 to +107
// Replace with a real order ID from your shop.
const int sampleOrderId = 0;
OrderDetails orderDetails = await client.GetOrderAsync(sampleOrderId);
Console.WriteLine($"Order {orderDetails.Id} has {orderDetails.OrderItems.Count} items.");

// Tax schemes are useful for reporting or custom invoice generation.
OrderTaxSchemesResponse taxSchemes = await client.GetOrderTaxSchemesAsync();
Console.WriteLine($"Tax scheme payload has properties: {taxSchemes.AdditionalData.Count}");

// Enable only when you want to mutate live order data.
bool runOrderUpdates = false;
if (runOrderUpdates)
{
// Add or update a public order note.
await client.UpdateOrderNoteAsync(sampleOrderId, "Packed and ready to ship.");
// Advance the order status (e.g., Processed, Shipped).
await client.UpdateOrderStatusAsync(sampleOrderId, OrderStatus.Processed);
// Provide carrier tracking for the buyer.
await client.UpdateOrderTrackingAsync(sampleOrderId, "TRACKING-123");
// Register the IP for order notifications/webhooks.
await client.SetOrderNotifyAsync("203.0.113.10");
}
```
Copy link

Copilot AI Dec 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The README code snippet is missing the IBrickOwlClient client variable declaration that appears at the beginning of the actual demo file. The code example should start with IBrickOwlClient client = BrickOwlClientFactory.Build(); to ensure users can copy and run this snippet standalone.

Copilot uses AI. Check for mistakes.
Comment on lines +113 to +142
// Bulk metadata for catalog sync jobs (downloads files, not items themselves).
CatalogBulkResponse bulkCatalog = await client.CatalogBulkAsync("catalog");
// Lookup multiple BOIDs at once to reduce round trips.
CatalogBulkLookupResponse bulkLookup = await client.CatalogBulkLookupAsync(new[] { "737117-39", "1067768" });
// Text search for items (supports pagination).
CatalogSearchResponse searchResults = await client.CatalogSearchAsync("Brick", page: 1);
// Condition list helps map new/used terminology for filters.
CatalogConditionListResponse conditions = await client.GetCatalogConditionListAsync();
// Field options supply valid values for attributes such as category.
CatalogFieldOptionListResponse fieldOptions = await client.GetCatalogFieldOptionListAsync("category_0", "en");

// Build a basic cart to estimate pricing or availability.
CatalogCartBasicResponse cart = await client.CreateCatalogCartBasicAsync(
new[] { ("3034", 21, (string?)null, 1) },
"N",
"US");

// Batch multiple endpoints into one API call.
var batchRequests = new (string Endpoint, string RequestMethod, IEnumerable<Dictionary<string, string>> Parameters)[]
{
("catalog/search",
"GET",
new List<Dictionary<string, string>>
{
// Per-request parameter dictionary.
new() { { "query", "Vendor" } }
})
};
BulkBatchResponse batchResponse = await client.BulkBatchAsync(batchRequests);
```
Copy link

Copilot AI Dec 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The README code snippet is missing the IBrickOwlClient client variable declaration. The code example should start with IBrickOwlClient client = BrickOwlClientFactory.Build(); to match the actual demo file and ensure users can copy and run this snippet standalone.

Copilot uses AI. Check for mistakes.
// Bulk metadata for catalog sync jobs (downloads files, not items themselves).
CatalogBulkResponse bulkCatalog = await client.CatalogBulkAsync("catalog");
// Lookup multiple BOIDs at once to reduce round trips.
CatalogBulkLookupResponse bulkLookup = await client.CatalogBulkLookupAsync(new[] { "737117-39", "1067768" });
Copy link

Copilot AI Dec 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The array initialization syntax differs from the actual demo code. In the actual CatalogAdvancedDemo.cs file (line 47), the code uses collection expression syntax ["737117-39", "1067768"], but here the README uses explicit array syntax new[] { "737117-39", "1067768" }. While both are valid, consider matching the demo code for consistency.

Suggested change
CatalogBulkLookupResponse bulkLookup = await client.CatalogBulkLookupAsync(new[] { "737117-39", "1067768" });
CatalogBulkLookupResponse bulkLookup = await client.CatalogBulkLookupAsync(["737117-39", "1067768"]);

Copilot uses AI. Check for mistakes.
Comment on lines +125 to +126
CatalogCartBasicResponse cart = await client.CreateCatalogCartBasicAsync(
new[] { ("3034", 21, (string?)null, 1) },
Copy link

Copilot AI Dec 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The inline array initialization syntax for cartItems differs from the actual demo code. In the actual CatalogAdvancedDemo.cs file (lines 63-66), the code first declares a named variable var cartItems = new (string DesignId, int? ColorId, string? Boid, int Quantity)[] { ("3034", 21, null, 1) }; and then passes it to the method. The README uses an inline array initialization instead. Consider matching the demo code for consistency, especially since it makes the tuple field names explicit and more self-documenting.

Suggested change
CatalogCartBasicResponse cart = await client.CreateCatalogCartBasicAsync(
new[] { ("3034", 21, (string?)null, 1) },
var cartItems = new (string DesignId, int? ColorId, string? Boid, int Quantity)[]
{
("3034", 21, null, 1)
};
CatalogCartBasicResponse cart = await client.CreateCatalogCartBasicAsync(
cartItems,

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants