{"id":20134233,"url":"https://github.com/japlscript/obstspot","last_synced_at":"2026-05-08T20:33:35.133Z","repository":{"id":57727427,"uuid":"408401227","full_name":"japlscript/obstspot","owner":"japlscript","description":"Java API for the Spotify app (macOS)","archived":false,"fork":false,"pushed_at":"2022-07-14T08:00:19.000Z","size":361,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-05T05:51:23.515Z","etag":null,"topics":["apple","applescript","japlscript","java","macos","spotify"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-2.1","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/japlscript.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":"2021-09-20T10:35:47.000Z","updated_at":"2021-10-13T12:37:18.000Z","dependencies_parsed_at":"2022-09-26T21:51:25.072Z","dependency_job_id":null,"html_url":"https://github.com/japlscript/obstspot","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/japlscript/obstspot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/japlscript%2Fobstspot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/japlscript%2Fobstspot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/japlscript%2Fobstspot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/japlscript%2Fobstspot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/japlscript","download_url":"https://codeload.github.com/japlscript/obstspot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/japlscript%2Fobstspot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32795958,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-08T08:22:46.396Z","status":"ssl_error","status_checked_at":"2026-05-08T08:22:45.650Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["apple","applescript","japlscript","java","macos","spotify"],"created_at":"2024-11-13T21:07:24.559Z","updated_at":"2026-05-08T20:33:35.116Z","avatar_url":"https://github.com/japlscript.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![LGPL 2.1](https://img.shields.io/badge/License-LGPL_2.1-blue.svg)](https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html)\n[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.tagtraum/obstspot/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.tagtraum/obstspot)\n[![Build and Test](https://github.com/japlscript/obstspot/workflows/Build%20and%20Test/badge.svg)](https://github.com/japlscript/obstspot/actions)\n\n\n# Obstspot\n\n*Obstspot* is a Java API for the Spotify app (macOS) based on\n[JaplScript](https://github.com/japlscript/japlscript).\n\n\n## Installation\n\nObstspot is released via [Maven](https://maven.apache.org).\nYou can install it via the following dependency:\n\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003ecom.tagtraum\u003c/groupId\u003e\n    \u003cartifactId\u003eobstspot\u003c/artifactId\u003e\n\u003c/dependency\u003e\n```\n\nThe Maven artifacts also contain sources and javadocs. \n\nIf you are using [modules](https://en.wikipedia.org/wiki/Java_Platform_Module_System),\nits name is `tagtraum.obstspot`.\n\n\n## Usage\n                           \nTo use the generated code, do something like this:\n\n```java\nimport com.tagtraum.macos.spotify.Application;\n\npublic class GetCurrentTrack {\n\n    public static void main(final String[] args) {\n        final Application application = Application.getInstance();\n        final Track currentTrack = application.getCurrentTrack();\n        if (currentTrack == null) {\n            System.out.println(\"No current track\");\n        } else {\n            System.out.println(\"Current track: \" + currentTrack.getName()\n                + \" by \" + currentTrack.getArtist());\n        }\n    }\n}\n```\n              \nOr this:\n\n```java\nimport com.tagtraum.macos.spotify.Application;\n\npublic class PlayTrack {\n\n    public static void main(final String[] args) {\n        // provide URI, like \"spotify:track:5Up9Lj7QWudEfMc0ve5qWW\"\n        // as parameter\n        final String trackURI = args[0];\n        final Application application = Application.getInstance();\n        // arguments to playTrack are: trackURI and contextURI\n        // contextURI (this is the album or playlist URI) is optional,\n        // just leave it \"null\", if unknown.\n        application.playTrack(trackURI, null);\n    }\n}\n```\n## API\n\nYou can find the complete [API here](https://japlscript.github.io/obstspot/com/tagtraum/macos/spotify/package-summary.html). \n\n\n## AppleScript Sandbox\n\nSince macOS 10.14 (Mojave), Apple imposed a sandbox on AppleScript. Therefore\nyou may see dialog boxes requesting authorization to perform certain actions.\nAfter a while, these boxes simply disappear and there does not seem to be an easy\nway to authorize your app. In this case, you need to open the system preferences,\nnavigate to *Security \u0026 Privacy*, *Privacy*, and then *Automation*, and make\nsure your app is allowed to remote control whatever app you are trying to remote\ncontrol (see also [this article](https://blog.beatunes.com/2018/10/beatunes-on-mojave-and-windows-10-dark.html)).\n\nIf you are shipping a real app with a UI and not just a command line tool, you\nneed to customize the sandbox permission dialog. You can do so by adding\nthe key `NSAppleEventsUsageDescription` to your app bundle's `/Contents/Info.plist`\nfile. For example:\n\n    [...]\n    \u003ckey\u003eNSAppleEventsUsageDescription\u003c/key\u003e\n    \u003cstring\u003eSuperMusic uses AppleEvents to access your Music.app library,\n            e.g., to set BPM values or create playlists.\u003c/string\u003e\n    [...]\n\nApple's documentation for the keyword is [here](https://developer.apple.com/documentation/bundleresources/information_property_list/nsappleeventsusagedescription).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaplscript%2Fobstspot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjaplscript%2Fobstspot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaplscript%2Fobstspot/lists"}