Giter Site home page Giter Site logo

rpcserv's Introduction

RPCServ

RPCServ is a server and client designed to allow applications/services to send rich presence to the client from anywhere in the world by making a simple HTTP request.

It was made for use in a mobile Apple Music Discord Rich Presence shortcut, but can be used for anything. :p

Also BIG CREDITS to BennoCrafter who also worked on this project!

If you wanna use this with the Apple Music shortcut for iOS, it is located at bin/Shortcut.shorcut in the repository.

Client Instructions

Installation

Downloads coming soon!

Manual Installation

Requirements:

  1. Clone the github repository and change directory
git clone https://github.com/wxllow/rpcsev
cd rpcserv/client
  1. Install the dependencies
poetry install

Running

  1. Run the client
poetry run python client.py
  1. Create a token

Go to rpcserv.wxllow.dev and login to create a secret token. (Will be different if you use a custom server)

  1. Add the token to the client

Once the app is running, you will be prompted to enter a token. Enter the token you created in step 2 and click Ok.

  1. Send a request

Curl Example:

curl -X POST -H "Content-Type: application/json" -d '{"state": "Hello World!", "details": "RPCServ is awesome!"}

Configuration

Reset Token

Once you have authorized with the server, your secret token will persist even after reauthenticating. To reset your token, simply go to rpcserv.wxllow.dev/authorize/reset (Will be different if you use a custom server)

Custom Client ID

If you would like to use a custom client ID, you can set one in your config file (located at ~/.config/rpcserv/config.json on macOS/Linux and %APPDATA%\rpcserv\config.json on Windows).

Example:

{
    "client_id": "123456789012345678"

}

Custom Server

You can also set a custom server in your config file. Example:

{
    "server": "https://rpcserv.wxllow.dev"

}

Request Parameters List

List of parameters that can be sent in an RPC request.

{
    "clear": boolean, // If true, clears the rich presence, ignoring all other parameters
    "state": string,
    "details": string,
    "large_image": string,
    "large_text": string,
    "metadata": {}, // Metadata that can be used by a client for whatever purpose
}

rpcserv's People

Contributors

wxllow avatar dependabot[bot] avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.