★ wanayoo — archive 1999 https://github.com/pyed/rtapiNouvelle recherche | Portail wanayoo
Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 

README.md

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

Topics

Resources

License

Releases

No releases published

Packages

No packages published

Languages

You can’t perform that action at this time.