Git Product home page Git Product logo

go-debrid's Introduction

go-debrid

Go Reference

Go library for the public APIs of debrid services like RealDebrid, AllDebrid and Premiumize

Features

  • Get user account info
  • Get instant availability (cache) info for a link / torrent
  • Add a link / torrent to a debrid service's downloads
  • Get status info about a link / torrent that the debrid service is downloading / has downloaded
  • Get the direct download link for a link / torrent after the debrid service has downloaded it
  • Delete the torrent that the debrid service is downloading / has downloaded

Usage

The library consists of a root-level package which contains a cache interface and example cache implementation, as well as subpackages for the specific debrid services. Each service-specific subpackage contains both a legacy client (the client from v0.1.0), and a low level client whose methods match the public API endpoints. In the future a common client will be added that has a generic interface and is backed by service-specific clients.

Godoc:

Example

package main

import (
    "context"
    "fmt"

    "github.com/deflix-tv/go-debrid/realdebrid"
)

func main() {
    // Create new client
    auth := realdebrid.Auth{KeyOrToken: "123"}
    rd := realdebrid.NewClient(realdebrid.DefaultClientOpts, auth, nil)

    // We're using some info hashes of "Night of the Living Dead" from 1968, which is in the public domain
    infoHashes := []string{
        "50B7DAFB7137CBECF045F78E8EFBE4AC1A90D139",
        "11EA02584FA6351956F35671962AB46354D99060",
    }
    availabilities, _ := rd.GetInstantAvailability(context.Background(), infoHashes...)

    // Iterate through the available torrents and print their details
    for hash, availability := range availabilities {
        fmt.Printf("Hash: %v\nAvailability: %+v\n", hash, availability)
    }
}

For more detailed examples see examples.

go-debrid's People

Contributors

doingodswork avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

go-debrid's Issues

Trying to use Deflix streamio addon with multiple debrid providers

I noticed in the streamio addon configuration, it seems to only allow one debrid provider to install. Is there any way to setup multiple debrid providers as a single addon to streamio? Fortunately, I have accounts on all three providers, and would like to make the most out of them by using all three.

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.