{"id":21361671,"url":"https://github.com/webpractik/ocf-converter-sdk-ts","last_synced_at":"2025-08-08T01:20:38.521Z","repository":{"id":63296553,"uuid":"566292859","full_name":"webpractik/ocf-converter-sdk-ts","owner":"webpractik","description":"SDK for onlineconvertfree.com file conversion API","archived":false,"fork":false,"pushed_at":"2022-12-08T08:59:18.000Z","size":27,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-07-30T13:05:57.910Z","etag":null,"topics":["api","sdk"],"latest_commit_sha":null,"homepage":"https://onlineconvertfree.com/file-conversion-api/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/webpractik.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-11-15T11:18:32.000Z","updated_at":"2025-07-12T03:58:14.000Z","dependencies_parsed_at":"2023-01-25T09:45:07.885Z","dependency_job_id":null,"html_url":"https://github.com/webpractik/ocf-converter-sdk-ts","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/webpractik/ocf-converter-sdk-ts","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webpractik%2Focf-converter-sdk-ts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webpractik%2Focf-converter-sdk-ts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webpractik%2Focf-converter-sdk-ts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webpractik%2Focf-converter-sdk-ts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/webpractik","download_url":"https://codeload.github.com/webpractik/ocf-converter-sdk-ts/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webpractik%2Focf-converter-sdk-ts/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269351651,"owners_count":24402621,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-07T02:00:09.698Z","response_time":73,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","sdk"],"created_at":"2024-11-22T06:10:53.690Z","updated_at":"2025-08-08T01:20:38.492Z","avatar_url":"https://github.com/webpractik.png","language":"TypeScript","readme":"# ocf-converter-sdk for TypeScript\n\nSDK for [onlineconvertfree.com](https://onlineconvertfree.com/) [file conversion API](https://onlineconvertfree.com/file-conversion-api/).\n\n## Installation \u0026 Usage\n\n### Requirements\n\nNode.js 16.15.1.\n\n### Install\n\n```shell\nnpm install ocf-converter-sdk\n```\n\n## Getting Started\n\nPlease follow the [installation procedure](#installation--usage) and then start from the following:\n\n```typescript\nimport * as fs from 'fs';\nimport * as https from 'https';\nimport { OcfClient } from 'ocf-converter-sdk';\n\nconst apiKey = 'myApiKey';\n\nconst client = new OcfClient(apiKey);\n\nconst filePath = '/path/to/file/to/convert.png';\nconst extensionToConvertTo = 'pdf';\n\nconst task = await client.uploadFile(filePath, extensionToConvertTo);\n\nconst result = await task.waitForConversion();\n\nif (result.isSuccess()) {\n    const resultUrl = result.getResultingFileUrl() as string;\n\n    await new Promise((resolve, reject) =\u003e {\n        https.get(resultUrl, (response =\u003e {\n            const path = `${__dirname}/result.${extensionToConvertTo}`;\n            const filePath = fs.createWriteStream(path);\n            response.pipe(filePath);\n            filePath.on('finish', async () =\u003e {\n                filePath.close();\n\n                await result.deleteFile();\n\n                resolve(0);\n            }).on('error', error =\u003e reject(error));\n        })).on('error', error =\u003e reject(error));\n    });\n}\n```\n\n## License\n\nSDK is made available under the MIT License (MIT). Please see [License File](LICENSE) for more information.\n\n## Contribution\n\n[OpenAPI Typescript Codegen](https://github.com/ferdikoomen/openapi-typescript-codegen/) is used for the client generation.\n\n### Requirements\n\n[OpenAPI Typescript Codegen](https://github.com/ferdikoomen/openapi-typescript-codegen/) is required for the client generation.\n\n### Client generation\n\nTo regenerate the client do the following:\n\n- run generation command:\n\n```shell\nnpm run api-codegen\n```\n\n- reformat the generated code with your IDE.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebpractik%2Focf-converter-sdk-ts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwebpractik%2Focf-converter-sdk-ts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebpractik%2Focf-converter-sdk-ts/lists"}