Skip to content

latchmihay/rtapi

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rtapi

Raw rTorrent XML-RPC in Go, Written for rtelegram

Requirements

  • rTorrent compiled with --with-xmlrpc-c.
  • scgi_port = localhost:5000 in your .rtorrent.rc

How to get

go get github.com/pyed/rtapi

How to use

package main

import (
	"fmt"

	"github.com/pyed/rtapi"
)

func main() {
	rt, err := rtapi.NewRtorrent("localhost:5000") // Or /path/to/socket for "scgi_local".
	if err != nil {
		// ...
	}

	// Get torrents
	torrents, err := rt.Torrents()
	if err != nil {
		// ...
	}

	fmt.Println("Number of torrents:", len(torrents))

	for _, t := range torrents {
		fmt.Println(t.Name)
	}
}

About

Raw rTorrent XML-RPC in Go

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%