{"id":26784376,"url":"https://github.com/cmsong111/imgbb-sdk-unofficial","last_synced_at":"2025-03-29T10:19:45.889Z","repository":{"id":255217981,"uuid":"848885573","full_name":"cmsong111/imgbb-sdk-unofficial","owner":"cmsong111","description":"ImaBB Java/Kotlin Unofficial SDK","archived":false,"fork":false,"pushed_at":"2025-03-16T15:18:23.000Z","size":4008,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-16T16:23:30.394Z","etag":null,"topics":["imgbb-api"],"latest_commit_sha":null,"homepage":"https://mvnrepository.com/artifact/io.github.cmsong111/imgbb-unofficial","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cmsong111.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-28T15:27:19.000Z","updated_at":"2025-03-16T15:12:26.000Z","dependencies_parsed_at":"2024-08-28T17:46:23.765Z","dependency_job_id":"96dcc357-41b0-43a7-af16-ee1ce665d801","html_url":"https://github.com/cmsong111/imgbb-sdk-unofficial","commit_stats":null,"previous_names":["cmsong111/imgbb-sdk-unofficial"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmsong111%2Fimgbb-sdk-unofficial","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmsong111%2Fimgbb-sdk-unofficial/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmsong111%2Fimgbb-sdk-unofficial/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmsong111%2Fimgbb-sdk-unofficial/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cmsong111","download_url":"https://codeload.github.com/cmsong111/imgbb-sdk-unofficial/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246168301,"owners_count":20734431,"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","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":["imgbb-api"],"created_at":"2025-03-29T10:19:44.482Z","updated_at":"2025-03-29T10:19:45.881Z","avatar_url":"https://github.com/cmsong111.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ImgBB Unofficial Java SDK\n\nThis is an unofficial Java SDK for the [ImgBB](https://imgbb.com) API.\nIt provides a simple way to interact with the ImgBB API using Java.\n\n## Installation\n\nAdd Dependency to your `gradle.build` file:\n\n```gradle\ndependencies {\n    implementation 'io.github.cmsong111:imgbb-unofficial:0.0.4'\n}\n```\n\n## Usage\n\n### Upload Image File\n\n```kotlin\nimport io.github.cmsong111.ImgBB\n\npublic void example() {\n    val key = \"INPUT_YOUR_API_KEY\"\n    val imageBB = ImgBB(key)\n\n    val image = File(\"path/to/image.jpg\")\n\n    val result = imageBB.uploadImage(file)\n}\n```\n\n### Upload Image Bytes (Spring Boot Example)\n\n```kotlin\nimport io.github.cmsong111.ImgBB\nimport org.springframework.http.MediaType\n\n@RestController\nclass ExampleController {\n    private val imageBB = ImgBB(\"INPUT_YOUR_API_KEY\")\n\n    @PostMapping(\"/upload\", consumes = [MediaType.MULTIPART_FORM_DATA_VALUE])\n    fun uploadImage(file: MultipartFile): String {\n        val result = imageBB.uploadImage(\n            image = file.bytes,\n            name = file.originalFilename,\n            expiration = null,\n        )\n        return result.url\n    }\n}\n```\n\n### Parameters\n\n- `file`: The image file to upload.\n    - The image file. under 32MB.\n- `name`: The name of the image file.\n    - Use the original file name.\n- `expiration`: The time in seconds to keep the image on the server.\n    - 0 ~ 15552000 (180 days)\n    - null is not expired.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcmsong111%2Fimgbb-sdk-unofficial","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcmsong111%2Fimgbb-sdk-unofficial","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcmsong111%2Fimgbb-sdk-unofficial/lists"}