diff --git a/enum-presentation.md b/enum-presentation.md index 7c517e0..a2c4dfe 100644 --- a/enum-presentation.md +++ b/enum-presentation.md @@ -71,10 +71,10 @@ enum UsefulFor { -# Okay, that's great, but when should I use an enum? +# Okay, that's great, but how do I know when to use one? -## (Or "Booleans? More like, _Fooleans_!") +## (Or, "Booleans? More like, _Fooleans!_") So, picture this. You've got some code that analyzes a computer network. diff --git a/swr-api-hooks.md b/swr-api-hooks.md new file mode 100644 index 0000000..0a8aea8 --- /dev/null +++ b/swr-api-hooks.md @@ -0,0 +1,123 @@ +--- +title: SWR API Hooks (and other assorted magicks) +--- + +# Okay but truly, what are you on about? + + +## So, hopefully we've all seen a bit of swagger at one point or another + + +```yaml +openapi: 3.0.1 +info: + title: ELT API +paths: + /liens/count: + get: + tags: + - Liens + summary: "Get Count of Lien Summaries. Note: When a search param is provided\ + \ date filters are ignored." + parameters: + - name: filter + in: query + description: "" + required: false + schema: + $ref: '#/components/schemas/BaseLiensFilter' + responses: + "200": + content: + text/plain: + schema: + type: integer + format: int32 + "400": + $ref: '#/components/responses/InvalidRequest' + security: + - Basic: [] + + /yada-yada-yada: +``` + + + + +# Maybe, + + +## a few times, + + +### you've even clicked 'Try it Out' + + +``` + ┍━━━━━━━━━━━━┑ + │ Try it Out │ + ┕━━━━━━━━━━━━┙ +``` + + +# Which is pretty nice in its own right. + + + + +# You may have also noticed some generated typescript for the frontend: + +``` +generated/ +├── apis +│   ├── AdminApi.ts +│   ├── index.ts +│   ├── LetterDataApi.ts +│   ├── LetterEventsApi.ts +│   ├── LettersApi.ts +│   ├── PacketDetailsApi.ts +│   ├── PacketsApi.ts +│   ├── PreferencesApi.ts +│   ├── SecondLettersApi.ts +│   └── SparklerDefaultApi.ts +├── index.ts +├── models +│   ├── AffiliateExclusion.ts +│   ├── DeletePacketRequestBody.ts +│   ├── DeselectedInterestsResponse.ts +│   ├── DeselectedInterest.ts +│   ├── DeselectedLetterRequestBody.ts +│   ├── EventId.ts +│   ├── EventLog.ts +│   ├── Event.ts +│   ├── FirmBook.ts +│   ├── GetEventLogsResponse.ts +│   ├── GetPreferencesResponse.ts +│   ├── GetResponse.ts +│   ├── index.ts +│   ├── LetterSummary.ts +│   ├── Letter.ts +│   ├── ListAffiliateExclusionsFilter.ts +│   ├── ListAffiliateExclusionsResponse.ts +│   ├── ListPacketsFilter.ts +│   ├── ListPacketsResponse.ts +│   ├── MailingAddress.ts +│   ├── Money.ts +│   ├── PacketDetailsData.ts +│   ├── PacketSummary.ts +│   ├── Packet.ts +│   ├── SecondLetterPacket.ts +│   ├── SecondLettersResponse.ts +│   ├── SecondLetter.ts +│   ├── User.ts +│   ├── UspsRre.ts +│   ├── ViolationResponse.ts +│   └── Violation.ts +├── openapitools.json +└── runtime.ts +``` + +# However + +## With the power of +