Skip to content

Commit

Permalink
add more auction endpoints to the docs
Browse files Browse the repository at this point in the history
  • Loading branch information
j0Shi82 committed Oct 14, 2022
1 parent a82bef5 commit c11f34a
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 6 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ dev/php.ini
!cache/.gitkeep
vuepress-docs/node_modules
vuepress-docs/src/.vuepress/.cache
vuepress-docs/src/.vuepress/.temp
vuepress-docs/src/.vuepress/.temp
vuepress-docs/src/.vuepress/dist
8 changes: 5 additions & 3 deletions vuepress-docs/src/.vuepress/client.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
import { defineClientConfig } from '@vuepress/client'
import apiTester from './components/api-tester.vue'

import hljsVuePlugin from "@highlightjs/vue-plugin";
import 'highlight.js/styles/stackoverflow-light.css'
import hljs from 'highlight.js/lib/core';
import json from 'highlight.js/lib/languages/json';

hljs.registerLanguage('json', json);

export default defineClientConfig({
enhance({ app, router, siteData }) {
app.use(hljsVuePlugin);
async enhance({ app, router, siteData }) {
if (!__VUEPRESS_SSR__) {
const hljsVuePlugin = await import('@highlightjs/vue-plugin')
app.use(hljsVuePlugin.default);
}
app.component('api-tester', apiTester);
},
setup() {},
Expand Down
2 changes: 1 addition & 1 deletion vuepress-docs/src/.vuepress/components/api-tester.vue
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ const request = () => {
axios({
method: props.method,
url: 'http://localhost:8084' + props.endpoint + query.value,
url: 'https://api.uncnso.red' + props.endpoint + query.value,
data: {
...p
}
Expand Down
33 changes: 32 additions & 1 deletion vuepress-docs/src/api/auction.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,35 @@ Gets the latest crawled info for items within a certain date range

### Live Test

<api-tester endpoint="/v1/auctions/items" method="GET" :hasQuery="true" />
<api-tester endpoint="/v1/auctions/items" method="GET" :hasQuery="true" />

## GET /v1/auctions/itemdetails

Gets all datapoints for a specific item

### Parameters

| Name | Value | Optional
| ----------- | ----------- | ----------- |
| item_def | String | true |
| server | "GLOBAL" | true |

### Response <`application/json`>

```json
[
{
"InsertedDate": "YYYY-MM-DD",
"InsertedTimestamp": Timestamp,
"AvgLow": Number,
"AvgMean": Number,
"AvgMedian": Number,
"AvgCount": Number
}
//...
]
```

### Live Test

<api-tester endpoint="/v1/auctions/itemdetails" method="GET" :hasQuery="true" />

0 comments on commit c11f34a

Please sign in to comment.