From 10931d6c8f16ceeae4dadc87ecc619e83a29b94b Mon Sep 17 00:00:00 2001 From: Tony Xiao Date: Mon, 4 Dec 2023 01:20:46 -0800 Subject: [PATCH] docs: Update docs and example imports --- README.md | 15 ++++++--------- bin/updateExampleImports.ts | 11 +++++------ examples/package.json | 1 + 3 files changed, 12 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 83ed8fe..5ebaf9b 100644 --- a/README.md +++ b/README.md @@ -109,10 +109,9 @@ Instead of navigating through thousands of lines of code across multiple files, In traditional settings, each API client behaves uniquely, requiring developers to learn the nuances of every specific SDK. However, with OpenSDKs, there's a unifying similarity in how all APIs behave. This consistency significantly reduces the learning curve, making it easier for developers to transition between different APIs without the need to relearn or adjust to a new environment. - ## Getting Started -Visit https://docs.opensdks.org/quickstart to get started with OpenSDKs. +Visit https://docs.opensdks.org/quickstart to get started with OpenSDKs. ## Documentation @@ -120,26 +119,24 @@ Visit [https://docs.opensdks.org/introduction](https://docs.opensdks.org/introdu ## Examples -Check out the example "summarize GitHub PR with OpenAI" app under [`examples/sum-pr`](https://github.com/useVenice/openSDKs/tree/main/examples/sum-pr). Demo link is here [https://what-did-we-work-on.vercel.app//](https://what-did-we-work-on.vercel.app//). - - https://github.com/useVenice/openSDKs/blob/a3281e910c489fbeb7c70787a3fe6da5ca5f525f/examples/example.ts#L1-L128 https://github.com/useVenice/openSDKs/blob/a3281e910c489fbeb7c70787a3fe6da5ca5f525f/examples/summarize-pr.ts#L1-L54 +For a full app example, check out the [`What did we work on app`](https://github.com/dosu-ai/what-did-we-work-on/). Demo link is here [https://what-did-we-work-on.vercel.app//](https://what-did-we-work-on.vercel.app//). ## Community -The OpenSDKs roadmap can be found on [GitHub Projects](https://github.com/orgs/useVenice/projects/2). +The OpenSDKs roadmap can be found on [GitHub Projects](https://github.com/orgs/useVenice/projects/2). To chat with other community members you can join the [OpenSDKs Discord](https://discord.gg/6VNXagtqZK). [Twitter](https://twitter.com/openSDKs) -## Contributing +## Add a missing SDK -To contribute new SDKs to the OpenSDKs suite, you can follow the [`CONTRIBUTING.md`](https://github.com/useVenice/openSDKs/blob/main/CONTRIBUTING.md). +To contribute new SDKs to the OpenSDKs suite, you can follow the [`CONTRIBUTING.md`](https://github.com/useVenice/openSDKs/blob/main/CONTRIBUTING.md). ## Contributors - \ No newline at end of file + diff --git a/bin/updateExampleImports.ts b/bin/updateExampleImports.ts index 5400910..04de41d 100644 --- a/bin/updateExampleImports.ts +++ b/bin/updateExampleImports.ts @@ -12,12 +12,11 @@ const sdkList = fs withFileTypes: true, }) .filter((r) => r.isDirectory()) - .map((d) => { - const path = pathJoin(__dirname, '../sdks', d.name) + .map((d) => pathJoin(__dirname, '../sdks', d.name, 'package.json')) + .filter((p) => fs.existsSync(p)) + .map((p) => { // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment - const pkgJson: {name: string} = JSON.parse( - fs.readFileSync(pathJoin(path, 'package.json'), 'utf-8'), - ) + const pkgJson: {name: string} = JSON.parse(fs.readFileSync(p, 'utf-8')) return pkgJson.name }) @@ -32,7 +31,7 @@ async function updateDocImports() { pathJoin(__dirname, '../examples/package.json'), await prettier.format(JSON.stringify(pkgJson), { ...(require('../prettier.config') as {}), - parser: 'json', + filepath: 'package.json', // Sort imports will apply, better than just parser: json }), ) } diff --git a/examples/package.json b/examples/package.json index c52b7f7..5711a62 100644 --- a/examples/package.json +++ b/examples/package.json @@ -11,6 +11,7 @@ "@opensdks/sdk-plaid": "workspace:*", "@opensdks/sdk-slack": "workspace:*", "@opensdks/sdk-twilio_api_v2010": "workspace:*", + "@opensdks/sdk-twilio_messaging_v1": "workspace:*", "@opensdks/sdk-venice": "workspace:*", "twilio": "^4.19.3" },