{"id":47098533,"url":"https://github.com/jacobhumston/sxcu.api","last_synced_at":"2026-03-12T14:56:54.387Z","repository":{"id":65281375,"uuid":"588821706","full_name":"jacobhumston/sxcu.api","owner":"jacobhumston","description":"Node.js library to interact with the sxcu.net API.","archived":false,"fork":false,"pushed_at":"2026-02-28T21:09:05.000Z","size":4183,"stargazers_count":4,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-01T00:23:06.976Z","etag":null,"topics":["javascript","library","node","nodejs","npm","sxcu"],"latest_commit_sha":null,"homepage":"https://sxcu.api.lovelyjacob.com/","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/jacobhumston.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"buy_me_a_coffee":"lovelyjacob"}},"created_at":"2023-01-14T05:46:33.000Z","updated_at":"2025-11-17T14:20:25.000Z","dependencies_parsed_at":"2023-10-26T16:37:33.528Z","dependency_job_id":"1fd0f5d2-1c0a-4c37-b31d-e869d2423d74","html_url":"https://github.com/jacobhumston/sxcu.api","commit_stats":null,"previous_names":["jacobhumston/sxcu.api","lovely-experiences/sxcu.api"],"tags_count":20,"template":false,"template_full_name":null,"purl":"pkg:github/jacobhumston/sxcu.api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacobhumston%2Fsxcu.api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacobhumston%2Fsxcu.api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacobhumston%2Fsxcu.api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacobhumston%2Fsxcu.api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jacobhumston","download_url":"https://codeload.github.com/jacobhumston/sxcu.api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacobhumston%2Fsxcu.api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30429163,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-12T14:34:45.044Z","status":"ssl_error","status_checked_at":"2026-03-12T14:09:33.793Z","response_time":114,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["javascript","library","node","nodejs","npm","sxcu"],"created_at":"2026-03-12T14:56:53.821Z","updated_at":"2026-03-12T14:56:54.375Z","avatar_url":"https://github.com/jacobhumston.png","language":"TypeScript","funding_links":["https://buymeacoffee.com/lovelyjacob","https://paypal.me/MisterFix"],"categories":[],"sub_categories":[],"readme":"\u003cimg src=\"https://raw.githubusercontent.com/jacobhumston/sxcu.api/banner/new-banner.png\" alt=\"sxcu.api\"\u003e\n\n# sxcu.api\n\nNode.js library to interact with the sxcu.net API. _([A cli is also included!](https://github.com/jacobhumston/sxcu.api/blob/main/src/cli/README.md))_\n\nsxcu.api was created to allow any developer of any skill set to easily create images, links, etc on sxcu.net without the hassle of learning the sxcu.net documentation directly.\n\n\u003e This module has **0** dependencies. _(excluding dev)_ [Check for yourself!](https://github.com/jacobhumston/sxcu.api/blob/main/package.json)\n\n## Links\n\n**sxcu.api:** [Docs](https://sxcu.api.lovelyjacob.com) / [Github](https://github.com/Lovely-Experiences/sxcu.api) / [npm](https://www.npmjs.com/package/sxcu.api)\n\n**sxcu.net:** [Website](https://sxcu.net/) / [API Docs](https://sxcu.net/api/docs/) / [Discord](https://discord.gg/ZBcYQwMWTG) / [Donate](https://paypal.me/MisterFix)\n\n### Updating to v2.0.0 from v1.x.x\n\nThe guide for doing so can be found [here](https://sxcu.api.lovelyjacob.com/guides/updating-to-v2.html).\n\n## Installation\n\nYou can install sxcu.api using npm.\n\n```bash\nnpm install sxcu.api\n```\n\nIf you would like to install the latest developer build, you can install from the `dev-build` branch.\n\n```bash\nnpm install \"https://github.com/jacobhumston/sxcu.api.git#dev-build\"\n```\n\n## Documentation\n\nThe documentation includes api information and guides/tutorials.\n\n- Latest version: [sxcu.api.lovelyjacob.com](https://sxcu.api.lovelyjacob.com)\n- Development version: [sxcu.api.lovelyjacob.com/dev](https://sxcu.api.lovelyjacob.com/dev/)\n\n## Example Usage\n\nHere is an example of uploading a file.\n\n```js\n// Import the package.\nimport * as sxcu from 'sxcu.api';\n\n// Set the request user agent to the default.\n// This will be done for you on the first request if you don't do it yourself.\nsxcu.UserAgent.useDefault();\n\n// Upload the file and log the response.\nsxcu.uploadFile('image.png')\n    .then((response) =\u003e console.log(response))\n    .catch((err) =\u003e console.log(err));\n```\n\nIn `v2.0.0` we made the switch to ESM and TypeScript. **However, we still support CommonJS.**\n\n```js\n// Use CommonJS's require method.\nconst { uploadFile, UserAgent, categorizeImports } = require('sxcu.api');\n\nUserAgent.useDefault();\n\nuploadFile('your-img')\n    .then((response) =\u003e console.log(response))\n    .catch((err) =\u003e console.log(err));\n```\n\nIf you preferred categorized imports, then you can use `categorizeImports`. This works with ESM and CommonJS.\n\n```js\n// Import the package.\nimport { categorizeImports } from 'sxcu.api';\n\n// Categorize imports.\nconst sxcu = categorizeImports();\n\n// Set the request user agent to the default.\nsxcu.userAgent.useDefault();\n\n// Upload the file and log the response.\nsxcu.files\n    .uploadFile('image.png')\n    .then((response) =\u003e console.log(response))\n    .catch((err) =\u003e console.log(err));\n```\n\nRespecting rate limits has been made extremely easy, all you need to do is enable the request queue.\n\n```js\n// Import methods.\nimport { toggleRequestQueue } from 'sxcu.api';\n\n// Enable the request queue.\ntoggleRequestQueue(true, true);\n```\n\nNeed to make a custom request? It's pretty simple as well. The request method allows you to make requests that respect rate limits as well (as long as `toggleRequestQueue` is used beforehand).\n\n```js\n// Import methods.\nimport { request, toggleRequestQueue, resolveError } from 'sxcu.api';\n\n// Enable the request queue.\ntoggleRequestQueue(true, true);\n\n// Create your own request.\nconst response = await request({\n    type: 'GET',\n    statusErrors: [400, 429],\n    baseUrl: 'https://sxcu.net/api/',\n    path: `files/abc123`,\n}).catch((error) =\u003e {\n    throw resolveError(error);\n});\n```\n\n## Contributors\n\n\u003c!-- readme: collaborators,contributors,jacobhumston-school/- -start --\u003e\n\u003ctable\u003e\n\u003ctr\u003e\n    \u003ctd align=\"center\"\u003e\n        \u003ca href=\"https://github.com/jacobhumston\"\u003e\n            \u003cimg src=\"https://avatars.githubusercontent.com/u/57332486?v=4\" width=\"100;\" alt=\"jacobhumston\"/\u003e\n            \u003cbr /\u003e\n            \u003csub\u003e\u003cb\u003eJacob Humston\u003c/b\u003e\u003c/sub\u003e\n        \u003c/a\u003e\n    \u003c/td\u003e\u003c/tr\u003e\n\u003c/table\u003e\n\u003c!-- readme: collaborators,contributors,jacobhumston-school/- -end --\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjacobhumston%2Fsxcu.api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjacobhumston%2Fsxcu.api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjacobhumston%2Fsxcu.api/lists"}