1
0
Fork 0
mirror of https://github.com/classchartsapi/classcharts-api-js.git synced 2026-05-14 11:58:13 +00:00

docs: update docs to include deno

This commit is contained in:
James Cook 2023-08-30 13:09:14 +01:00
parent 3be1064901
commit 0d9d64cb07
4 changed files with 16 additions and 31 deletions

View file

@ -25,7 +25,7 @@ jobs:
node-version: "18.x" node-version: "18.x"
registry-url: "https://registry.npmjs.org" registry-url: "https://registry.npmjs.org"
- name: npm build - name: npm build
run: deno task -A npm ${{steps.get_tag_version.outputs.TAG_VERSION}} run: deno task npm ${{steps.get_tag_version.outputs.TAG_VERSION}}
- name: npm publish - name: npm publish
if: startsWith(github.ref, 'refs/tags/') if: startsWith(github.ref, 'refs/tags/')
env: env:

View file

@ -1,7 +1,7 @@
<p align="center"> <p align="center">
<h1 align="center">ClassCharts API JS</h1> <h1 align="center">ClassCharts API JS</h1>
<p align="center"> <p align="center">
A typescript wrapper for getting information from the Classcharts API A Node.js and Deno Typescript wrapper for getting information from the Classcharts API.
</p> </p>
</p> </p>
<p align="center"> <p align="center">
@ -10,6 +10,8 @@
<a href="https://github.com/classchartsapi/classcharts-api-js/issues">Issues</a> <a href="https://github.com/classchartsapi/classcharts-api-js/issues">Issues</a>
<span>&nbsp;&nbsp;&nbsp;&nbsp;</span> <span>&nbsp;&nbsp;&nbsp;&nbsp;</span>
<a href="https://www.npmjs.com/package/classcharts-api">NPM</a> <a href="https://www.npmjs.com/package/classcharts-api">NPM</a>
<span>&nbsp;&nbsp;&nbsp;&nbsp;</span>
<a href="https://deno.land/x/classcharts_api">Deno</a>
<span>&nbsp;&nbsp;&nbsp;&nbsp;</span> <span>&nbsp;&nbsp;&nbsp;&nbsp;</span>
<a href="https://discord.gg/DTcwugcgZ2">Discord</a> <a href="https://discord.gg/DTcwugcgZ2">Discord</a>
<span>&nbsp;&nbsp;&nbsp;&nbsp;</span> <span>&nbsp;&nbsp;&nbsp;&nbsp;</span>
@ -33,6 +35,7 @@ help from the community.
## Requirements ## Requirements
- Node.js 18 or newer - Node.js 18 or newer
- Deno
## NPM ## NPM
@ -40,12 +43,16 @@ help from the community.
npm install classcharts-api # npm npm install classcharts-api # npm
``` ```
```bash ## Deno
yarn add classcharts-api # yarn
```
```bash The imports in the examples are for Node.js, but can easily be substituted for
pnpm add classcharts-api # pnpm Deno.
```typescript
import {
ParentClient,
StudentClient,
} from "https://deno.land/x/classcharts_api/mod.ts";
``` ```
# Logging In # Logging In
@ -56,7 +63,7 @@ session ID which will be used for all requests.
## Student Client ## Student Client
```typescript ```typescript
import { StudentClient } from "classcharts-api"; import { StudentClient } from "classcharts-api"; // Node.js
// Date of birth MUST in the format DD/MM/YYYY // Date of birth MUST in the format DD/MM/YYYY
const client = new StudentClient("classchartsCode", "01/1/2000"); const client = new StudentClient("classchartsCode", "01/1/2000");

View file

@ -7,7 +7,7 @@
<img alt="node-current" src="https://img.shields.io/node/v/classcharts-api"> <img alt="node-current" src="https://img.shields.io/node/v/classcharts-api">
</div> </div>
<p align="center">A typescript wrapper for getting information from the Classcharts API.</p> <p align="center">A Node.js and Deno Typescript wrapper for getting information from the Classcharts API.</p>
# Links # Links

View file

@ -1,22 +0,0 @@
/** @type {import('typedoc-plugin-umami').TypeDocOptions} */
module.exports = {
entryPointStrategy: "resolve",
plugin: ["typedoc-plugin-umami"],
entryPoints: [
"src/core/studentClient.ts",
"src/core/parentClient.ts",
"src/core/baseClient.ts",
"src/types.ts",
],
navigationLinks: {
Discord: "https://discord.gg/DTcwugcgZ2",
Github: "https://github.com/classchartsapi/classcharts-api-js",
},
includeVersion: true,
out: "docs/typedoc",
sort: "required-first",
umamiOptions: {
src: "https://umami.jaminit.co.uk/script.js",
websiteId: "dd8c53b8-dc99-484c-911d-b08c898498a8",
},
};