kopia lustrzana https://github.com/transitive-bullshit/chatgpt-api
feat: export base URLs
rodzic
b7244883e0
commit
0f17f53fcf
|
@ -1,5 +1,7 @@
|
|||
import ky from 'ky'
|
||||
|
||||
export const METAPHOR_BASE_URL = 'https://api.metaphor.systems'
|
||||
|
||||
export type MetaphorSearchResult = {
|
||||
author: string | null
|
||||
dateCreated: string | null
|
||||
|
@ -18,7 +20,7 @@ export class MetaphorClient {
|
|||
|
||||
constructor({
|
||||
apiKey = process.env.METAPHOR_API_KEY,
|
||||
baseUrl = 'https://api.metaphor.systems'
|
||||
baseUrl = METAPHOR_BASE_URL
|
||||
}: {
|
||||
apiKey?: string
|
||||
baseUrl?: string
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
import ky from 'ky'
|
||||
|
||||
export const NOVU_BASE_URL = 'https://api.novu.co/v1'
|
||||
|
||||
export type NovuSubscriber = {
|
||||
subscriberId: string
|
||||
email?: string
|
||||
|
@ -22,7 +24,7 @@ export class NovuClient {
|
|||
|
||||
constructor({
|
||||
apiKey = process.env.NOVU_API_KEY,
|
||||
baseUrl = 'https://api.novu.co/v1'
|
||||
baseUrl = NOVU_BASE_URL
|
||||
}: {
|
||||
apiKey?: string
|
||||
baseUrl?: string
|
||||
|
|
|
@ -11,6 +11,8 @@ export interface SerpAPIClientOptions extends Partial<SerpAPIParams> {
|
|||
baseUrl?: string
|
||||
}
|
||||
|
||||
export const SERPAPI_BASE_URL = 'https://serpapi.com'
|
||||
|
||||
/**
|
||||
* Lightweight wrapper around SerpAPI that only supports Google search.
|
||||
*
|
||||
|
@ -23,7 +25,7 @@ export class SerpAPIClient {
|
|||
|
||||
constructor({
|
||||
apiKey = process.env.SERPAPI_API_KEY ?? process.env.SERP_API_KEY,
|
||||
baseUrl = 'https://serpapi.com',
|
||||
baseUrl = SERPAPI_BASE_URL,
|
||||
...params
|
||||
}: SerpAPIClientOptions = {}) {
|
||||
if (!apiKey) {
|
||||
|
|
Ładowanie…
Reference in New Issue