{"id":21009871,"url":"https://github.com/39software/webring-api","last_synced_at":"2025-05-15T02:33:32.827Z","repository":{"id":205384114,"uuid":"699384826","full_name":"x86-39/webring-api","owner":"x86-39","description":"API server and frontend to help in maintaining a webring. Written in Quarkus + Kotlin!","archived":false,"fork":false,"pushed_at":"2024-09-03T11:18:54.000Z","size":419,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-11-08T10:54:55.317Z","etag":null,"topics":["webring","webrings"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc0-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/x86-39.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":"2023-10-02T14:27:06.000Z","updated_at":"2024-09-30T23:02:12.000Z","dependencies_parsed_at":"2023-11-30T20:26:53.065Z","dependency_job_id":"9bbe04e8-dae6-404d-b481-0f6f4e534f9b","html_url":"https://github.com/x86-39/webring-api","commit_stats":null,"previous_names":["queercoded-dev/webring-api","x86-39/webring-api"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/x86-39%2Fwebring-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/x86-39%2Fwebring-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/x86-39%2Fwebring-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/x86-39%2Fwebring-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/x86-39","download_url":"https://codeload.github.com/x86-39/webring-api/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225324097,"owners_count":17456467,"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":["webring","webrings"],"created_at":"2024-11-19T09:18:11.183Z","updated_at":"2025-05-15T02:33:27.478Z","avatar_url":"https://github.com/x86-39.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# webring-api\nWenring API \u0026 Frontend.\n\nIf you want to learn more about Quarkus, please visit its website: https://quarkus.io/ .\n\nAPI code: [SiteResource.kt](https://github.com/diademiemi/webring-api/blob/main/src/main/kotlin/dev/queercoded/webring/SiteResource.kt)  \nIntegration Tests: [SiteResourceTest.kt](https://github.com/diademiemi/webring-api/blob/main/src/test/kotlin/dev/queercoded/webring/SiteResourceTest.kt)  \n\n\n## Running the application in dev mode\n\nYou can run your application in dev mode that enables live coding using:\n```shell script\n./gradlew quarkusDev\n```\n\n## Packaging and running the application\n\nThe application can be packaged using:\n```shell script\n./gradlew build\n```\nIt produces the `quarkus-run.jar` file in the `build/quarkus-app/` directory.\nBe aware that it’s not an _über-jar_ as the dependencies are copied into the `build/quarkus-app/lib/` directory.\n\nThe application is now runnable using `java -jar build/quarkus-app/quarkus-run.jar`.\n\nIf you want to build an _über-jar_, execute the following command:\n```shell script\n./gradlew build -Dquarkus.package.type=uber-jar\n```\n\nThe application, packaged as an _über-jar_, is now runnable using `java -jar build/*-runner.jar`.\n\n## Creating a native executable\n\nYou can create a native executable using: \n```shell script\n./gradlew build -Dquarkus.package.type=native\n```\n\nOr, if you don't have GraalVM installed, you can run the native executable build in a container using: \n```shell script\n./gradlew build -Dquarkus.package.type=native -Dquarkus.native.container-build=true\n```\n\nYou can then execute your native executable with: `./build/webring-api-1.0.0-SNAPSHOT-runner`\n\nIf you want to learn more about building native executables, please consult https://quarkus.io/guides/gradle-tooling.\n\n# API Documentation\n\n## Env vars\n```\n# Dev\nexport WEBRING_API_TOKEN=ADMIN_TOKEN_CHANGE_ME\nexport WEBRING_API_URL=http://127.0.0.1:8080\n\n# Prod\nexport WEBRING_API_TOKEN=...\nexport WEBRING_API_URL=https://webring.queercoded.dev\n```\n\n## List sites\n```\ncurl -X GET -H \"Content-Type: application/json\" -H \"Authorization: Bearer ${WEBRING_API_TOKEN}\" -v -k ${WEBRING_API_URL}/sites/all | jq\n\n```\n\n## List all disabled sites\n```\ncurl -X GET -H \"Content-Type: application/json\" -H \"Authorization: Bearer ${WEBRING_API_TOKEN}\" -v -k ${WEBRING_API_URL}/sites/disabled | jq\n\n```\n\n## List all dead end sites\n```\ncurl -X GET -H \"Content-Type: application/json\" -H \"Authorization: Bearer ${WEBRING_API_TOKEN}\" -v -k ${WEBRING_API_URL}/sites/all-dead-end | jq\n\n```\n\n## List all sites including disabled \u0026 dead ends\n```\ncurl -X GET -H \"Content-Type: application/json\" -H \"Authorization: Bearer ${WEBRING_API_TOKEN}\" -v -k ${WEBRING_API_URL}/sites/all-plus-disabled | jq\n\n```\n\n## Create site\n```\nexport SITE_DATA=$(cat \u003c\u003c EOF\n{\n\t\"name\": \"Queer Coded\",\n\t\"domain\": \"queercoded.dev\",\n\t\"https\": true,\n\t\"author\": \"Queer Coded Staff\",\n\t\"path\": \"/\",\n\t\"disable_checks\": false,\n\t\"enabled\": true\n}\nEOF\n)\n\ncurl -X POST \\\n-H \\\n\"Content-Type: application/json\" \\\n--data ${SITE_DATA} \\\n-H \\\n\"Authorization: Bearer ${WEBRING_API_TOKEN}\" \\\n-v -k ${WEBRING_API_URL}/sites/ --raw\n\n```\n\n## Update site\n```\nexport SITE_ID=1\nexport SITE_DATA=$(cat \u003c\u003c EOF\n{\n\t\"disable_checks\": true\n}\nEOF\n)\n\ncurl -X PUT \\\n-H \\\n\"Content-Type: application/json\" \\\n--data ${SITE_DATA} \\\n-H \\\n\"Authorization: Bearer ${WEBRING_API_TOKEN}\" \\\n-v -k ${WEBRING_API_URL}/sites/id/${SITE_ID}/update --raw\n```\n\n## Enable site\n```\nexport SITE_ID=1\n\ncurl -X PUT \\\n-H \\\n\"Content-Type: application/json\" \\\n-H \\\n\"Authorization: Bearer ${WEBRING_API_TOKEN}\" \\\n-v -k ${WEBRING_API_URL}/sites/id/${SITE_ID}/enable --raw\n\n```\n\n## Disable site\n\n```\nexport SITE_ID=1\n\ncurl -X PUT \\\n-H \\\n\"Content-Type: application/json\" \\\n-H \\\n\"Authorization: Bearer ${WEBRING_API_TOKEN}\" \\\n-v -k ${WEBRING_API_URL}/sites/id/${SITE_ID}/disable --raw\n\n```\n\n## Delete site\n```\nexport SITE_ID=1\n\ncurl -X DELETE -H \"Content-Type: application/json\" -H \"Authorization: Bearer ${WEBRING_API_TOKEN}\" -v -k ${WEBRING_API_URL}/sites/id/${SITE_ID} --raw\n```\n\n## Force recheck sites\n```\ncurl -X DELETE -H \"Content-Type: application/json\" -H \"Authorization: Bearer ${WEBRING_API_TOKEN}\" -v -k ${WEBRING_API_URL}/sites/force-recheck --raw\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F39software%2Fwebring-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F39software%2Fwebring-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F39software%2Fwebring-api/lists"}