Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gbaptista/magic-status-api
My personal local API for Magic Status, a KDE Plasma Widget.
https://github.com/gbaptista/magic-status-api
Last synced: 8 days ago
JSON representation
My personal local API for Magic Status, a KDE Plasma Widget.
- Host: GitHub
- URL: https://github.com/gbaptista/magic-status-api
- Owner: gbaptista
- License: mit
- Created: 2022-04-24T15:51:41.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-04-28T00:55:29.000Z (over 2 years ago)
- Last Synced: 2024-10-11T18:58:16.347Z (about 1 month ago)
- Language: Ruby
- Homepage:
- Size: 7.81 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Magic Status API
My personal local API for [_Magic Status_](https://github.com/gbaptista/magic-status).
- [Setup](#setup)
- [Endpoints](#endpoints)
- [`/time`](#time)
- [`/music`](#music)
- [`/music-progress`](#music-progress)
- [Development](#development)## Setup
```sh
git clone https://github.com/gbaptista/magic-status-api.gitcd magic-status-api
bundle
bundle exec rackup -p 5000
```If you don't want logs, just add `-q` to the `rackup` command.
## Endpoints
### `/time`
```json
{
"messages": [
"11:40:20",
"11:40"
]
}
```### `/music`
It leverages the [Media Player Remote Interfacing Specification](https://specifications.freedesktop.org/mpris-spec/latest/).
```json
{
"messages": [
"Rival Sons - Do Your Worst"
]
}
```Learn more:
- [MPRIS D-Bus Interface Specification](https://specifications.freedesktop.org/mpris-spec/latest/)
- [MPRIS - ArchWiki](https://wiki.archlinux.org/title/MPRIS)
- [Small Ruby Script - Gist](https://gist.github.com/Sledge/892428)### `/music-progress`
Same as `/music`, but with a progress bar.
```json
{
"messages": [
{
"label": {
"text": "Carol Biazin - Inveja (Ao Vivo)"
},
"progress": {
"value": 0.63
}
}
]
}
```## Development
```sh
git clone https://github.com/gbaptista/magic-status-api.gitcd magic-status-api
bundle
bundle exec rspec
bundle exec rubocop -abundle exec rackup -p 5000
```If you don't want logs, just add `-q` to the `rackup` command.