From 251e8125db9734bd19077117b89a0d9cb4653c8f Mon Sep 17 00:00:00 2001 From: j3lte Date: Wed, 12 Apr 2023 23:54:51 +0200 Subject: [PATCH] Improve docs --- src/Query.ts | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/src/Query.ts b/src/Query.ts index 44f0133..97cf3c7 100644 --- a/src/Query.ts +++ b/src/Query.ts @@ -6,9 +6,33 @@ import { addExpr, expr } from "./utils/expr.ts"; import { FieldImpl } from "./Field.ts"; export interface AuthOpts { + /** + * API token + * + * The Socrata Open Data API uses application tokens for two purposes: + * Using an application token allows us to throttle by application, rather than via IP address, which gives you a higher throttling limit + * Authentication using OAuth + * + * Docs: https://dev.socrata.com/docs/app-tokens.html + */ apiToken?: string; + /** + * Username (needs password) for Basic HTTP Auth + * + * Docs: https://dev.socrata.com/docs/authentication.html#authenticating-using-http-basic-authentication + */ username?: string; + /** + * Password (needs username) for Basic HTTP Auth + * + * Docs: https://dev.socrata.com/docs/authentication.html#authenticating-using-http-basic-authentication + */ password?: string; + /** + * OAuth Access Token + * + * Docs: https://dev.socrata.com/docs/authentication.html#using-an-oauth-20-access-token + */ accessToken?: string; }