lbryio / lbryio/lbry.go

Examples for using this repo to download LBRY content?

Open
#83 16 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
31
Forks
20
PR merge metrics
No merged PRs in 30d

Description

I would like to write a client program that, given a LBRY URI (e.g. `lbry://@irmf#a/irmf-logo-model-1.irmf#4`),
the client downloads the data (provided that either the user has already paid for the content or the content is free).

Eventually, it would be nice to allow the user to optionally send credits if the content is gated and they have not already purchased it. But for starting out, I would just like to download the content that is either free or previously-paid-for.

I'm not finding any examples, and searching through the subdirectories, it is not obvious to me how to get started.

If I were to take a random stab-in-the-dark, for example, I might try doing the following:

* `lbrycrd.New(lbrycrdURL, chainParams)` (What should `lbrycrdURL` and `chainParams` be?)

but then I get stuck, as none of the methods appear to be what I want.

Alternatively, maybe I need to go this route:

* `blobex.NewBlobExchangeClient(cc)` (How should I get `cc` correctly?)
* `blobex.Download(ctx)` (How do I specify the URI for the content?)

Can you please provide some guidance on the steps that need to be taken?

Thank you!

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the lbrycrd.New and blobex.NewBlobExchangeClient entry points mentioned in the issue, including how blobex.Download receives a content URI. Provide a working Go example for downloading a free or previously paid LBRY URI, documenting the required client configuration and what successful completion looks like.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
documentation
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.