{"id":19788870,"url":"https://github.com/niklaskorz/setlx-addons","last_synced_at":"2025-09-07T14:46:00.958Z","repository":{"id":147568092,"uuid":"82856194","full_name":"niklaskorz/setlX-addons","owner":"niklaskorz","description":"Useful addons to the SetlX interpreter","archived":false,"fork":false,"pushed_at":"2017-03-29T20:57:06.000Z","size":24,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-28T14:44:11.949Z","etag":null,"topics":["addon","okhttp","setlx","setlx-addons","setlx-interpreter"],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/niklaskorz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2017-02-22T21:51:30.000Z","updated_at":"2017-02-23T20:23:36.000Z","dependencies_parsed_at":null,"dependency_job_id":"3d3cd159-7b75-4f55-81d7-9768b95fec12","html_url":"https://github.com/niklaskorz/setlX-addons","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/niklaskorz/setlX-addons","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niklaskorz%2FsetlX-addons","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niklaskorz%2FsetlX-addons/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niklaskorz%2FsetlX-addons/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niklaskorz%2FsetlX-addons/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/niklaskorz","download_url":"https://codeload.github.com/niklaskorz/setlX-addons/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niklaskorz%2FsetlX-addons/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274051288,"owners_count":25214024,"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-09-07T02:00:09.463Z","response_time":67,"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":["addon","okhttp","setlx","setlx-addons","setlx-interpreter"],"created_at":"2024-11-12T06:29:04.316Z","updated_at":"2025-09-07T14:46:00.907Z","avatar_url":"https://github.com/niklaskorz.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SetlX Addons\n\nThis repository contains my addons to the SetlX interpreter.\n\n## HTTP (work in progress)\n\nThe `setlX-http` addon defines functions for making HTTP requests\nin SetlX. Under the hood, it uses\n[OkHttp](http://square.github.io/okhttp/)\nand\n[JSON-java](https://github.com/stleary/JSON-java).\nYou can find a prebuilt version of the addon under\nthe [release tab](https://github.com/niklaskorz/setlX-addons/releases)\nof this repository.\n\n### Dependencies\n\n- [Gradle](https://gradle.org/)\n- Java 1.7+\n\n### Build instructions\n\nBefore building, make sure to install the `org.randoom.setlx:setlX-core:2.6.0`\npackage to your local maven repository. This can be done by running\n`mvn clean install` in the `interpreter` directory of the\n[SetlX repository](https://github.com/herrmanntom/setlX/tree/v2.6.0).\nIn the code snippet below, replace the string `$setlXJarDirectory` with the value that\nis assigned to the variable setlXJarDirectory in your SetlX start script.  In order\nto install the addons, open a shell in the directory where setlx-addons has been installed.\nThen, building the addons is achieved with the following commands:\n\n- `cd http`\n- `gradle clean fatJar`\n- `cp build/libs/setlX-http.jar $setlXJarDirectory`\n\nThis will make the functions `http_get` and `http_getJson` available in your SetlX interpreter.\n\n### Usage example\n\n```stlx\nurl := \"https://api.ipify.org/\";\nip := http_get(url);\nprint(\"My IP address is \", ip);\n\nurl := \"https://api.spotify.com/v1/search?type=track\u0026query=Afraid%20of%20heights\";\ndata := http_getJson(url);\ntrack := data[\"tracks\"][\"items\"][1];\nartist := track[\"artists\"][1];\ntrackName := track[\"name\"];\nartistName := artist[\"name\"];\ntrackDuration := track[\"duration_ms\"];\ntrackPreview := track[\"preview_url\"];\nprint(\"The song $trackName$ by $artistName$ has a duration of $trackDuration$ milliseconds.\");\nprint(\"You can listen to a preview of it on $trackPreview$\");\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fniklaskorz%2Fsetlx-addons","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fniklaskorz%2Fsetlx-addons","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fniklaskorz%2Fsetlx-addons/lists"}