Skip to content

Commit bb494aa

Browse files
committed
docs: rename /api to /guide/vpic, update all links
1 parent add36ce commit bb494aa

File tree

87 files changed

+333
-323
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+333
-323
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ WMIs, get all makes for a certain year, and more.
6161
- [Install](https://vpic.shaggytech.com/guide/install)
6262
- [Node Quick Start](https://vpic.shaggytech.com//guide/getting-started#node-quick-start)
6363
- [Browser Quick Start](https://vpic.shaggytech.com/guide/getting-started#browser-quick-start)
64-
- [API Reference](https://vpic.shaggytech.com/api/)
64+
- [API Reference](https://vpic.shaggytech.com/guide/vpic/)
6565

6666
## Mono Repo Structure
6767

@@ -129,9 +129,9 @@ const { Results } = await DecodeVinValues("WA1A4AFY2J2008189");
129129
const decodedVehicle = Results[0]; // equals an object of type DecodeVinValuesResults
130130
```
131131

132-
For a full example response see: [DecodeVinValues](https://vpic.shaggytech.com/api/endpoints/decode-vin-values#returns)
132+
For a full example response see: [DecodeVinValues](https://vpic.shaggytech.com/guide/vpic/endpoints/decode-vin-values#returns)
133133

134-
All available endpoints can be found here: [VPIC API Endpoints](https://vpic.shaggytech.com/api/#vpic-api-endpoints)
134+
All available endpoints can be found here: [VPIC API Endpoints](https://vpic.shaggytech.com/guide/vpic/#vpic-api-endpoints)
135135

136136
## Browser Install
137137

apps/docs/.vitepress/menu-links.ts

Lines changed: 62 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -3,74 +3,86 @@ import { type DefaultTheme } from 'vitepress'
33
type SidebarItem = DefaultTheme.SidebarItem
44

55
const vpicEndpointLinks = [
6-
{ text: 'DecodeVin', link: '/api/endpoints/decode-vin' },
7-
{ text: 'DecodeVinExtended', link: '/api/endpoints/decode-vin-extended' },
8-
{ text: 'DecodeVinValues', link: '/api/endpoints/decode-vin-values' },
6+
{ text: 'DecodeVin', link: '/guide/vpic/endpoints/decode-vin' },
7+
{
8+
text: 'DecodeVinExtended',
9+
link: '/guide/vpic/endpoints/decode-vin-extended',
10+
},
11+
{ text: 'DecodeVinValues', link: '/guide/vpic/endpoints/decode-vin-values' },
912
{
1013
text: 'DecodeVinValuesBatch',
11-
link: '/api/endpoints/decode-vin-values-batch',
14+
link: '/guide/vpic/endpoints/decode-vin-values-batch',
1215
},
1316
{
1417
text: 'DecodeVinValuesExtended',
15-
link: '/api/endpoints/decode-vin-values-extended',
18+
link: '/guide/vpic/endpoints/decode-vin-values-extended',
19+
},
20+
{ text: 'DecodeWMI', link: '/guide/vpic/endpoints/decode-wmi' },
21+
{ text: 'GetAllMakes', link: '/guide/vpic/endpoints/get-all-makes' },
22+
{
23+
text: 'GetAllManufacturers',
24+
link: '/guide/vpic/endpoints/get-all-manufacturers',
1625
},
17-
{ text: 'DecodeWMI', link: '/api/endpoints/decode-wmi' },
18-
{ text: 'GetAllMakes', link: '/api/endpoints/get-all-makes' },
19-
{ text: 'GetAllManufacturers', link: '/api/endpoints/get-all-manufacturers' },
2026
{
2127
text: 'GetCanadianVehicleSpecifications',
22-
link: '/api/endpoints/get-canadian-vehicle-specifications',
28+
link: '/guide/vpic/endpoints/get-canadian-vehicle-specifications',
2329
},
2430
{
2531
text: 'GetEquipmentPlantCodes',
26-
link: '/api/endpoints/get-equipment-plant-codes',
32+
link: '/guide/vpic/endpoints/get-equipment-plant-codes',
2733
},
2834
{
2935
text: 'GetMakeForManufacturer',
30-
link: '/api/endpoints/get-make-for-manufacturer',
36+
link: '/guide/vpic/endpoints/get-make-for-manufacturer',
3137
},
3238
{
3339
text: 'GetMakesForManufacturerAndYear',
34-
link: '/api/endpoints/get-makes-for-manufacturer-and-year',
40+
link: '/guide/vpic/endpoints/get-makes-for-manufacturer-and-year',
3541
},
3642
{
3743
text: 'GetMakesForVehicleType',
38-
link: '/api/endpoints/get-makes-for-vehicle-type',
44+
link: '/guide/vpic/endpoints/get-makes-for-vehicle-type',
3945
},
4046
{
4147
text: 'GetManufacturerDetails',
42-
link: '/api/endpoints/get-manufacturer-details',
48+
link: '/guide/vpic/endpoints/get-manufacturer-details',
49+
},
50+
{
51+
text: 'GetModelsForMake',
52+
link: '/guide/vpic/endpoints/get-models-for-make',
53+
},
54+
{
55+
text: 'GetModelsForMakeId',
56+
link: '/guide/vpic/endpoints/get-models-for-make-id',
4357
},
44-
{ text: 'GetModelsForMake', link: '/api/endpoints/get-models-for-make' },
45-
{ text: 'GetModelsForMakeId', link: '/api/endpoints/get-models-for-make-id' },
4658
{
4759
text: 'GetModelsForMakeIdYear',
48-
link: '/api/endpoints/get-models-for-make-id-year',
60+
link: '/guide/vpic/endpoints/get-models-for-make-id-year',
4961
},
5062
{
5163
text: 'GetModelsForMakeYear',
52-
link: '/api/endpoints/get-models-for-make-year',
64+
link: '/guide/vpic/endpoints/get-models-for-make-year',
5365
},
54-
{ text: 'GetParts', link: '/api/endpoints/get-parts' },
66+
{ text: 'GetParts', link: '/guide/vpic/endpoints/get-parts' },
5567
{
5668
text: 'GetVehicleTypesForMake',
57-
link: '/api/endpoints/get-vehicle-types-for-make',
69+
link: '/guide/vpic/endpoints/get-vehicle-types-for-make',
5870
},
5971
{
6072
text: 'GetVehicleTypesForMakeId',
61-
link: '/api/endpoints/get-vehicle-types-for-make-id',
73+
link: '/guide/vpic/endpoints/get-vehicle-types-for-make-id',
6274
},
6375
{
6476
text: 'GetVehicleVariableList',
65-
link: '/api/endpoints/get-vehicle-variable-list',
77+
link: '/guide/vpic/endpoints/get-vehicle-variable-list',
6678
},
6779
{
6880
text: 'GetVehicleVariableValuesList',
69-
link: '/api/endpoints/get-vehicle-variable-values-list',
81+
link: '/guide/vpic/endpoints/get-vehicle-variable-values-list',
7082
},
7183
{
7284
text: 'GetWMIsForManufacturer',
73-
link: '/api/endpoints/get-wmis-for-manufacturer',
85+
link: '/guide/vpic/endpoints/get-wmis-for-manufacturer',
7486
},
7587
]
7688

@@ -217,12 +229,12 @@ const typedocLinks = [
217229
],
218230
},
219231
{
220-
text: 'Types Index',
232+
text: 'Types',
221233
link: '/typedoc/types',
222234
},
223235
]
224236

225-
export type LinkGroup = 'guide' | 'api' | 'typedocs'
237+
export type LinkGroup = 'guide' | 'typedocs'
226238

227239
const groupLinks: Record<LinkGroup, SidebarItem[]> = {
228240
guide: [
@@ -231,12 +243,19 @@ const groupLinks: Record<LinkGroup, SidebarItem[]> = {
231243
{ text: 'Getting Started', link: '/guide/getting-started' },
232244
{ text: 'Typescript', link: '/guide/typescript' },
233245
{
234-
text: 'Bring Your Own Fetch (BYOF)',
235-
link: '/guide/bring-your-own-fetch',
236-
},
237-
{
238-
text: 'Support for Node Versions < 18',
239-
link: '/guide/native-fetch',
246+
text: 'VPIC',
247+
items: [
248+
{ text: 'Overview', link: '/guide/vpic/' },
249+
{
250+
text: 'VPIC Response',
251+
link: '/guide/vpic/vpic-api-response',
252+
},
253+
{
254+
text: 'VPIC Functions',
255+
items: vpicEndpointLinks,
256+
collapsed: true,
257+
},
258+
],
240259
},
241260
{
242261
text: 'Examples',
@@ -256,17 +275,18 @@ const groupLinks: Record<LinkGroup, SidebarItem[]> = {
256275
{ text: 'useNHTSA', link: '/utils/use-nhtsa' },
257276
],
258277
},
259-
],
260-
api: [
261-
{ text: 'Overview', link: '/api/' },
262278
{
263-
text: 'VPIC Response',
264-
link: '/api/vpic-api-response',
265-
},
266-
{
267-
text: 'VPIC Functions',
268-
items: vpicEndpointLinks,
269-
collapsed: false,
279+
text: 'Misc',
280+
items: [
281+
{
282+
text: 'Bring Your Own Fetch (BYOF)',
283+
link: '/guide/bring-your-own-fetch',
284+
},
285+
{
286+
text: 'Support for Node Versions < 18',
287+
link: '/guide/native-fetch',
288+
},
289+
],
270290
},
271291
],
272292
typedocs: [{ text: 'Index', link: '/typedoc/' }, ...typedocLinks],
@@ -277,10 +297,6 @@ const linkGroups: Record<LinkGroup, SidebarItem> = {
277297
text: 'Guide',
278298
items: groupLinks.guide,
279299
},
280-
api: {
281-
text: 'API',
282-
items: groupLinks.api,
283-
},
284300
typedocs: {
285301
text: 'Typedocs',
286302
items: groupLinks.typedocs,

apps/docs/.vitepress/menu.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ const pkg = require('@shaggytools/nhtsa-api-wrapper/package.json')
77
function nav() {
88
return [
99
{ text: 'Guide', link: '/guide/', activeMatch: '/guide|utils/' },
10-
{ text: 'API', link: '/api/', activeMatch: '/api/' },
1110
{ text: 'Typedocs', link: '/typedoc/', activeMatch: '/typedoc/' },
1211
{
1312
text: pkg.version,
@@ -25,7 +24,6 @@ function sidebar() {
2524
return {
2625
'/guide/': sidebarLinks(['guide']),
2726
'/utils/': sidebarLinks(['guide']),
28-
'/api/': sidebarLinks(['api']),
2927
'/typedoc/': sidebarLinks(['typedocs']),
3028
}
3129
}

apps/docs/src/api/index.md

Lines changed: 0 additions & 39 deletions
This file was deleted.

apps/docs/src/guide/getting-started.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ Further Reading:
5454
- A more in depth explanation of how to decode a VIN and parse the data can be found on the
5555
[Decoding a VIN](../guide/vin-decoding) page.
5656

57-
- For a full example response see [DecodeVinValues](../api/endpoints/decode-vin-values#returns)
57+
- For a full example response see [DecodeVinValues](../guide/vpic/endpoints/decode-vin-values#returns)
5858
documentation.
5959

6060
- The structure of `Results[0]` in the above example can be seen on the
@@ -200,5 +200,5 @@ import {
200200

201201
- [VIN Decoding](../guide/vin-decoding)
202202
- [Offline VIN Validation](../guide/offline-vin-validation)
203-
- [VPIC API Response](../api/vpic-api-response)
204-
- [VPIC API Endpoints](../api/endpoints/#vpic-api-endpoints)
203+
- [VPIC API Response](../guide/vpic/vpic-api-response)
204+
- [VPIC API Endpoints](../guide/vpic/endpoints/#vpic-api-endpoints)

apps/docs/src/guide/index.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
✔️ A thin Javascript client for the [NHTSA VPIC API](https://vpic.nhtsa.dot.gov/api/)
66

7-
✔️ 24 helper functions to retrieve data from each of the [VPIC API endpoints](../api/index#vpic-api-endpoints)
7+
✔️ 24 helper functions to retrieve data from each of the [VPIC API endpoints](../guide/vpic/index#vpic-api-endpoints)
88

99
✔️ Works in Node.js via package managers and in browser scripts via CDN.
1010

@@ -29,7 +29,7 @@ make interacting with the API and retrieving data less of a chore.
2929

3030
- Provides a set of 24 helper functions to interact with each of the 24 endpoints, so you
3131
don't have to worry about the url structure, query parameters, formatting, or fetching the data.
32-
See the [VPIC API](/api/) section for more info.
32+
See the [VPIC API](/guide/vpic/) section for more info.
3333

3434
- Use the built in `fetch` functionionality or provide your own. The endpoint functions can be used
3535
to build full VPIC URLs for you to use your own fetch implentation such as Axios or a polyfill.
@@ -56,7 +56,7 @@ It can also be used to get all models of a make, to decode WMIs, get all makes f
5656
and more.
5757

5858
A list of all 24 VPIC endpoints can be found in the
59-
[NHTSA API Endpoints](../api/index#vpic-api-endpoints) section.
59+
[NHTSA API Endpoints](../guide/vpic/index#vpic-api-endpoints) section.
6060

6161
::: tip :bulb: TIP
6262

0 commit comments

Comments
 (0)