diff --git a/.agents/skills/ep-example-authoring/SKILL.md b/.agents/skills/ep-example-authoring/SKILL.md index fb3e844a..d0c56e2d 100644 --- a/.agents/skills/ep-example-authoring/SKILL.md +++ b/.agents/skills/ep-example-authoring/SKILL.md @@ -110,6 +110,28 @@ When a client library releases a new major version: 2. Update only `current` for latest major syntax/usage changes. 3. Keep endpoint/action coverage and naming consistent between versions unless API/library behavior requires divergence. +## Response Generation (Required For New/Updated Examples) + +When authoring or changing docs examples, make sure the matching response JSON is generated and updated. + +Quick workflow: + +1. `cd tools/build_doc_json_responses` +2. Remove related cassette file(s) in `tests/cassettes` for the response(s) you need to regenerate. +3. Run `just generate` with required API keys (run it twice; first pass records, second pass writes responses): + +```bash +# Source `.env` file or variables +just generate +``` + +4. Copy generated files from `tools/build_doc_json_responses/responses` into `official/docs/responses`. +5. Keep endpoint/action naming aligned between example snippets and response JSON paths. + +For complete setup, troubleshooting, and formatting details, see: + +- `tools/build_doc_json_responses/README.md` + ## Consistency Checklist Before Commit 1. Filename and folder parity against curl `current` action names. @@ -118,6 +140,7 @@ When a client library releases a new major version: 4. Placeholder IDs follow expected prefixes. 5. New data is non-PII and fixture-aligned where possible. 6. `current` directories remain present for all language docs. +7. Matching response JSON was regenerated/updated when snippet behavior changed. ## Optional Verification Commands @@ -132,7 +155,6 @@ find official/docs/responses -maxdepth 2 -type f | head ## Anti-Patterns -- Endpoint-prefixed response filenames. - Adding extra helper frameworks or architecture in simple snippets. - Introducing language-specific style drift not already present in that language's `current` precedent. - Changing historical version directories when the change should be only in `current`. diff --git a/composer.lock b/composer.lock index c8461c19..1bb31d11 100644 --- a/composer.lock +++ b/composer.lock @@ -672,16 +672,16 @@ }, { "name": "symfony/polyfill-php80", - "version": "v1.37.0", + "version": "v1.43.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "dfb55726c3a76ea3b6459fcfda1ec2d80a682411" + "reference": "9c6a5d6b01ca51d486c813e9a9c0ed55f208bb74" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/dfb55726c3a76ea3b6459fcfda1ec2d80a682411", - "reference": "dfb55726c3a76ea3b6459fcfda1ec2d80a682411", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/9c6a5d6b01ca51d486c813e9a9c0ed55f208bb74", + "reference": "9c6a5d6b01ca51d486c813e9a9c0ed55f208bb74", "shasum": "" }, "require": { @@ -732,7 +732,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.37.0" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.43.0" }, "funding": [ { @@ -752,7 +752,7 @@ "type": "tidelift" } ], - "time": "2026-04-10T16:19:22+00:00" + "time": "2026-09-25T15:50:05+00:00" } ], "packages-dev": [ diff --git a/official/docs/csharp/current/trackers/delete.cs b/official/docs/csharp/current/trackers/delete.cs new file mode 100644 index 00000000..2d02c681 --- /dev/null +++ b/official/docs/csharp/current/trackers/delete.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.Threading.Tasks; +using EasyPost; +using Newtonsoft.Json; + +namespace EasyPostExamples +{ + public class Examples + { + public static async Task Main() + { + var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); + + await client.Tracker.Delete("trk_..."); + } + } +} diff --git a/official/docs/golang/current/trackers/delete.go b/official/docs/golang/current/trackers/delete.go new file mode 100644 index 00000000..49eb7887 --- /dev/null +++ b/official/docs/golang/current/trackers/delete.go @@ -0,0 +1,15 @@ +package example + +import ( + "fmt" + + "github.com/EasyPost/easypost-go/v5" +) + +func delete() { + client := easypost.New("EASYPOST_API_KEY") + + err := client.DeleteTracker("trk_...") + + fmt.Println(err) +} diff --git a/official/docs/java/current/trackers/delete.java b/official/docs/java/current/trackers/delete.java new file mode 100644 index 00000000..596ea4e5 --- /dev/null +++ b/official/docs/java/current/trackers/delete.java @@ -0,0 +1,12 @@ +package trackers; + +import com.easypost.exception.EasyPostException; +import com.easypost.service.EasyPostClient; + +public class Delete { + public static void main(String[] args) throws EasyPostException { + EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); + + client.tracker.delete("trk_..."); + } +} diff --git a/official/docs/node/current/trackers/delete.js b/official/docs/node/current/trackers/delete.js new file mode 100644 index 00000000..e91be26b --- /dev/null +++ b/official/docs/node/current/trackers/delete.js @@ -0,0 +1,7 @@ +const EasyPostClient = require('@easypost/api'); + +const client = new EasyPostClient('EASYPOST_API_KEY'); + +(async () => { + await client.Tracker.delete('trk_...'); +})(); diff --git a/official/docs/php/current/trackers/delete.php b/official/docs/php/current/trackers/delete.php new file mode 100644 index 00000000..d32cdc71 --- /dev/null +++ b/official/docs/php/current/trackers/delete.php @@ -0,0 +1,5 @@ +tracker->delete('trk_...'); diff --git a/official/docs/python/current/trackers/delete.py b/official/docs/python/current/trackers/delete.py new file mode 100644 index 00000000..5a5dfc0e --- /dev/null +++ b/official/docs/python/current/trackers/delete.py @@ -0,0 +1,5 @@ +import easypost + +client = easypost.EasyPostClient("EASYPOST_API_KEY") + +client.tracker.delete("trk_...") diff --git a/official/docs/ruby/current/trackers/delete.rb b/official/docs/ruby/current/trackers/delete.rb new file mode 100644 index 00000000..06e8f1ab --- /dev/null +++ b/official/docs/ruby/current/trackers/delete.rb @@ -0,0 +1,5 @@ +require 'easypost' + +client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') + +client.tracker.delete('trk_...') diff --git a/tools/build_doc_json_responses/tests/test_tracker.py b/tools/build_doc_json_responses/tests/test_tracker.py index 01467a1e..aa4b002b 100644 --- a/tools/build_doc_json_responses/tests/test_tracker.py +++ b/tools/build_doc_json_responses/tests/test_tracker.py @@ -30,3 +30,11 @@ def test_trackers_batch(test_client, tracker_create): test_client.tracker.retrieve_batch(tracking_codes=[tracker1.tracking_code]) build_response_snippet(interaction_index=1) + + +@pytest.mark.vcr() +def test_trackers_delete(test_client, tracker_create): + tracker1 = test_client.tracker.create(**tracker_create) + test_client.tracker.delete(id=tracker1.id) + + build_response_snippet(interaction_index=1)